You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2017/06/19 12:41:07 UTC
[01/53] sling-site git commit: asf-site branch created for published
content
Repository: sling-site
Updated Branches:
refs/heads/asf-site [created] a6129baf4
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/archive.tpl
----------------------------------------------------------------------
diff --git a/templates/archive.tpl b/templates/archive.tpl
deleted file mode 100644
index 1aeca8b..0000000
--- a/templates/archive.tpl
+++ /dev/null
@@ -1,36 +0,0 @@
-layout 'layout/main.tpl', true,
- projects: projects,
- bodyContents: contents {
-
- div(class:"row"){
- div(class:"small-12 columns"){
- section(class:"wrap"){
- h1("Blog Archive")
-
- def last_month=null
- published_posts.each {post ->
- if (last_month) {
- if (post.date.format("MMMM yyyy") != last_month) {
- yieldUnescaped "</ul>"
- h4("${post.date.format("MMMM yyyy")}")
- yieldUnescaped "<ul>"
- }
- }
- else {
- h4("${post.date.format("MMMM yyyy")}")
- yieldUnescaped "<ul>"
- }
-
- li{
- yield "${post.date.format("dd")} - "
- a(href:"${config.site_contextPath}${post.uri}","${post.title}")
- }
- last_month = post.date.format("MMMM yyyy")
- }
- yield "</ul>"
-
- }
- }
- }
-
- }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/date-brick.tpl
----------------------------------------------------------------------
diff --git a/templates/date-brick.tpl b/templates/date-brick.tpl
deleted file mode 100644
index eca6a07..0000000
--- a/templates/date-brick.tpl
+++ /dev/null
@@ -1,7 +0,0 @@
-div(class:"termin"){
- div(class:"month","${post.date?.format("MMM")}")
- newLine()
- div(class:"date","${post.date?.format("dd")}")
- newLine()
- div(class:"year","${post.date?.format("yyyy")}")
-}
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/downloads.tpl
----------------------------------------------------------------------
diff --git a/templates/downloads.tpl b/templates/downloads.tpl
deleted file mode 100644
index 89fa3e0..0000000
--- a/templates/downloads.tpl
+++ /dev/null
@@ -1,364 +0,0 @@
-// ------------------------------------------------------------------------------------------------
-// Sling downloads page
-// http://www.apache.org/dev/release-download-pages.html explains how the apache.org mirrored
-// downloads page work. Basically, we provide a downloads.html page with a few placeholders
-// and a form to select the download mirrog, and a downloads.cgi page which wraps the apache.org
-// download logic CGI.
-// ------------------------------------------------------------------------------------------------
-
-// ------------------------------------------------------------------------------------------------
-// Downloads template data
-// The page template itself is found below.
-// ------------------------------------------------------------------------------------------------
-def launchpadVersion="9"
-
-def slingIDETooling=[
- "Sling IDE Tooling for Eclipse|eclipse|1.1.0|A p2 update site which can be installed in Eclipse.|sling-ide-tooling"
-]
-
-def slingApplication=[
- "Sling Standalone Application|A self-runnable Sling jar|org.apache.sling.launchpad|.jar|${launchpadVersion}",
- "Sling Web Application|A ready-to run Sling webapp as a war file|org.apache.sling.launchpad|-webapp.war|${launchpadVersion}",
- "Sling Source Release|The released Sling source code|org.apache.sling.launchpad|-source-release.zip|${launchpadVersion}",
-]
-
-def mavenPlugins=[
- "Maven JSPC Plugin|maven-jspc-plugin|2.0.8",
- "Maven Launchpad Plugin|maven-launchpad-plugin|2.3.4",
- "Maven Sling Plugin|maven-sling-plugin|2.3.0",
- "Slingstart Maven Plugin|slingstart-maven-plugin|1.7.6",
- "HTL Maven Plugin|htl-maven-plugin|1.0.6"
-]
-
-def bundles=[
- "Validation API|org.apache.sling.validation.api|1.0.0",
- "Validation Core|org.apache.sling.validation.core|1.0.0",
- "Adapter|org.apache.sling.adapter|2.1.10",
- "Adapter Annotations|adapter-annotations|1.0.0",
- "API|org.apache.sling.api|2.16.2",
- "Auth Core|org.apache.sling.auth.core|1.3.26",
- "Auth Form|org.apache.sling.auth.form|1.0.8",
- "Auth OpenID|org.apache.sling.auth.openid|1.0.4",
- "Auth Selector|org.apache.sling.auth.selector|1.0.6",
- "Authentication XING API|org.apache.sling.auth.xing.api|0.0.2",
- "Authentication XING Login|org.apache.sling.auth.xing.login|0.0.2",
- "Authentication XING OAuth|org.apache.sling.auth.xing.oauth|0.0.2",
- "Background Servlets Engine|org.apache.sling.bgservlets|1.0.8",
- "Background Servlets Integration Test|org.apache.sling.bgservlets.testing|1.0.0",
- "Bundle Resource Provider|org.apache.sling.bundleresource.impl|2.2.0",
- "Classloader Leak Detector|org.apache.sling.extensions.classloader-leak-detector|1.0.0",
- "Commons Classloader|org.apache.sling.commons.classloader|1.4.0",
- "Commons Compiler|org.apache.sling.commons.compiler|2.2.0",
- "Commons FileSystem ClassLoader|org.apache.sling.commons.fsclassloader|1.0.6",
- "Commons HTML|org.apache.sling.commons.html|1.0.0",
- "Commons Johnzon|org.apache.sling.commons.johnzon|1.0.0",
- "Commons JSON|org.apache.sling.commons.json|2.0.20",
- "Commons Log|org.apache.sling.commons.log|5.0.2",
- "Commons Log WebConsole Plugin|org.apache.sling.commons.log.webconsole|1.0.0",
- "Commons Log Service|org.apache.sling.commons.logservice|1.0.6",
- "Commons Metrics|org.apache.sling.commons.metrics|1.2.2",
- "Commons Mime Type Service|org.apache.sling.commons.mime|2.1.10",
- "Commons OSGi|org.apache.sling.commons.osgi|2.4.0",
- "Commons Scheduler|org.apache.sling.commons.scheduler|2.6.2",
- "Commons Testing|org.apache.sling.commons.testing|2.1.0",
- "Commons Threads|org.apache.sling.commons.threads|3.2.6",
- "Content Detection Support|org.apache.sling.commons.contentdetection|1.0.2",
- "Context-Aware Configuration API|org.apache.sling.caconfig.api|1.1.0",
- "Context-Aware Configuration bnd Plugin|org.apache.sling.caconfig.bnd-plugin|1.0.2",
- "Context-Aware Configuration Impl|org.apache.sling.caconfig.impl|1.4.2",
- "Context-Aware Configuration Mock Plugin|org.apache.sling.testing.caconfig-mock-plugin|1.3.0",
- "Context-Aware Configuration SPI|org.apache.sling.caconfig.spi|1.3.2",
- "Crankstart API|org.apache.sling.crankstart.api|1.0.0",
- "Crankstart API Fragment|org.apache.sling.crankstart.api.fragment|1.0.2",
- "Crankstart Core|org.apache.sling.crankstart.core|1.0.0",
- "Crankstart Launcher|org.apache.sling.crankstart.launcher|1.0.0",
- "Crankstart Launcher Sling Extensions|org.apache.sling.crankstart.sling.extensions|1.0.0",
- "Crankstart Launcher Test Services|org.apache.sling.crankstart.test.services|1.0.0",
- "DataSource Provider|org.apache.sling.datasource|1.0.2",
- "Discovery API|org.apache.sling.discovery.api|1.0.4",
- "Discovery Impl|org.apache.sling.discovery.impl|1.2.12",
- "Discovery Commons|org.apache.sling.discovery.commons|1.0.20",
- "Discovery Base|org.apache.sling.discovery.base|2.0.0",
- "Discovery Oak|org.apache.sling.discovery.oak|1.2.18",
- "Discovery Standalone|org.apache.sling.discovery.standalone|1.0.2",
- "Discovery Support|org.apache.sling.discovery.support|1.0.0",
- "Distributed Event Admin|org.apache.sling.event.dea|1.1.2",
- "Distribution API|org.apache.sling.distribution.api|0.3.0",
- "Distribution Core|org.apache.sling.distribution.core|0.2.8",
- "Distribution Integration Tests|org.apache.sling.distribution.it|0.1.2",
- "Distribution Sample|org.apache.sling.distribution.sample|0.1.6",
- "Dynamic Include|org.apache.sling.dynamic-include|3.0.0",
- "Engine|org.apache.sling.engine|2.6.8",
- "Event|org.apache.sling.event|4.2.2",
- "Event API|org.apache.sling.event.api|1.0.0",
- "Explorer|org.apache.sling.extensions.explorer|1.0.4",
- "Feature Flags|org.apache.sling.featureflags|1.2.0",
- "GWT Integration|org.apache.sling.gwt.servlet|3.0.0",
- "Thread Dumper|org.apache.sling.extensions.threaddump|0.2.2",
- "File System Resource Provider|org.apache.sling.fsresource|2.1.4",
- "I18n|org.apache.sling.i18n|2.5.8",
- "HApi|org.apache.sling.api|1.0.0",
- "Health Check Annotations|org.apache.sling.hc.annotations|1.0.4",
- "Health Check Core|org.apache.sling.hc.core|1.2.8",
- "Health Check API|org.apache.sling.hc.api|1.0.0",
- "Health Check Integration Tests|org.apache.sling.hc.it|1.0.4",
- "Health Check JUnit Bridge|org.apache.sling.hc.junit.bridge|1.0.2",
- "Health Check Samples|org.apache.sling.hc.samples|1.0.6",
- "Health Check Support|org.apache.sling.hc.support|1.0.4",
- "Health Check Webconsole|org.apache.sling.hc.webconsole|1.1.2",
- "Installer Core|org.apache.sling.installer.core|3.8.10",
- "Installer Console|org.apache.sling.installer.console|1.0.2",
- "Installer Configuration Support|org.apache.sling.installer.factory.configuration|1.1.2",
- "Installer Health Checks|org.apache.sling.installer.hc|1.0.0",
- "Installer Subystems Support|org.apache.sling.installer.factory.subsystems|1.0.0",
- "Installer File Provider|org.apache.sling.installer.provider.file|1.1.0",
- "Installer JCR Provider|org.apache.sling.installer.provider.jcr|3.1.26",
- "javax activation|org.apache.sling.javax.activation|0.1.0",
- "JCR API|org.apache.sling.jcr.api|2.4.0",
- "JCR API Wrapper|org.apache.sling.jcr.jcr-wrapper|2.0.0",
- "JCR Base|org.apache.sling.jcr.base|3.0.2",
- "JCR ClassLoader|org.apache.sling.jcr.classloader|3.2.2",
- "JCR Compiler|org.apache.sling.jcr.compiler|2.1.0",
- "JCR Content Loader|org.apache.sling.jcr.contentloader|2.2.4",
- "JCR Content Parser|org.apache.sling.jcr.contentparser|1.2.2",
- "JCR DavEx|org.apache.sling.jcr.davex|1.3.8",
- "JCR Jackrabbit AccessManager|org.apache.sling.jcr.jackrabbit.accessmanager|3.0.0",
- "JCR Jackrabbit Server|org.apache.sling.jcr.jackrabbit.server|2.3.0",
- "JCR Jackrabbit UserManager|org.apache.sling.jcr.jackrabbit.usermanager|2.2.6",
- "JCR Oak Server|org.apache.sling.jcr.oak.server|1.1.4",
- "JCR Prefs|org.apache.sling.jcr.prefs|1.0.0",
- "JCR Registration|org.apache.sling.jcr.registration|1.0.2",
- "JCR Repoinit|org.apache.sling.jcr.repoinit|1.1.4",
- "JCR Resource|org.apache.sling.jcr.resource|3.0.2",
- "JCR Resource Security|org.apache.sling.jcr.resourcesecurity|1.0.2",
- "JCR Web Console Plugin|org.apache.sling.jcr.webconsole|1.0.2",
- "JXM Resource Provider|org.apache.sling.jmx.provider|1.0.2",
- "JCR WebDAV|org.apache.sling.jcr.webdav|2.3.8",
- "JUnit Core|org.apache.sling.junit.core|1.0.26",
- "JUnit Remote Tests Runners|org.apache.sling.junit.remote|1.0.12",
- "JUnit Scriptable Tests Provider|org.apache.sling.junit.scriptable|1.0.12",
- "JUnit Tests Teleporter|org.apache.sling.junit.teleporter|1.0.14",
- "JUnit Health Checks|org.apache.sling.junit.healthcheck|1.0.6",
- "Karaf repoinit|org.apache.sling.karaf-repoinit|0.2.0",
- "Launchpad API|org.apache.sling.launchpad.api|1.1.0",
- "Launchpad Base|org.apache.sling.launchpad.base|5.6.4-2.6.18",
- "Launchpad Base - Application Launcher|org.apache.sling.launchpad.base|5.6.0-2.6.16|app",
- "Launchpad Base - Web Launcher|org.apache.sling.launchpad.base|5.6.0-2.6.16|webapp|war",
- "Launchpad Content|org.apache.sling.launchpad.content|2.0.12",
- "Launchpad Installer|org.apache.sling.launchpad.installer|1.2.2",
- "Launchpad Integration Tests|org.apache.sling.launchpad.integration-tests|1.0.",
- "Launchpad Test Fragment Bundle|org.apache.sling.launchpad.test-fragment|2.0.12",
- "Launchpad Test Bundles|org.apache.sling.launchpad.test-bundles|0.0.2",
- "Launchpad Testing|org.apache.sling.launchpad.testing|9",
- "Launchpad Testing WAR|org.apache.sling.launchpad.testing-war|9",
- "Launchpad Testing Services|org.apache.sling.launchpad.test-services|2.0.12",
- "Launchpad Testing Services WAR|org.apache.sling.launchpad.test-services-war|2.0.12||war",
- "Log Tracer|org.apache.sling.tracer|1.0.4",
- "Models API|org.apache.sling.models.api|1.3.4",
- "Models bnd Plugin|org.apache.sling.bnd.models|1.0.0",
- "Models Implementation|org.apache.sling.models.impl|1.4.2",
- "Models Jackson Exporter|org.apache.sling.models.jacksonexporter|1.0.6",
- "NoSQL Generic Resource Provider|org.apache.sling.nosql.generic|1.1.0",
- "NoSQL Couchbase Client|org.apache.sling.nosql.couchbase-client|1.0.2",
- "NoSQL Couchbase Resource Provider|org.apache.sling.nosql.couchbase-resourceprovider|1.1.0",
- "NoSQL MongoDB Resource Provider|org.apache.sling.nosql.mongodb-resourceprovider|1.1.0",
- "Oak Restrictions|org.apache.sling.oak.restrictions|1.0.0",
- "Path-based RTP sample|org.apache.sling.samples.path-based.rtp|2.0.4",
- "Pax Exam Utilities|org.apache.sling.paxexam.util|1.0.4",
- "Performance Test Utilities|org.apache.sling.performance.base|1.0.2",
- "Pipes|org.apache.sling.pipes|0.0.10",
- "Provisioning Model|org.apache.sling.provisioning.model|1.8.2",
- "Repoinit Parser|org.apache.sling.repoinit.parser|1.1.0",
- "Resource Access Security|org.apache.sling.resourceaccesssecurity|1.0.0",
- "Resource Builder|org.apache.sling.resourcebuilder|1.0.2",
- "Resource Collection|org.apache.sling.resourcecollection|1.0.0",
- "Resource Inventory|org.apache.sling.resource.inventory|1.0.8",
- "Resource Merger|org.apache.sling.resourcemerger|1.3.2",
- "Resource Presence|org.apache.sling.resource.presence|0.0.2",
- "Resource Resolver|org.apache.sling.resourceresolver|1.5.24",
- "Rewriter|org.apache.sling.rewriter|1.2.0",
- "Failing Server-Side Tests|org.apache.sling.testing.samples.failingtests|1.0.6",
- "Sample Integration Tests|org.apache.sling.testing.samples.integrationtests|1.0.6",
- "Sample Server-Side Tests|org.apache.sling.testing.samples.sampletests|1.0.6",
- "Scripting API|org.apache.sling.scripting.api|2.2.0",
- "Scripting Console|org.apache.sling.scripting.console|1.0.0",
- "Scripting Core|org.apache.sling.scripting.core|2.0.46",
- "Scripting EL API Wrapper|org.apache.sling.scripting.el-api|1.0.0",
- "Scripting Java|org.apache.sling.scripting.java|2.1.2",
- "Scripting JavaScript|org.apache.sling.scripting.javascript|3.0.0",
- "Scripting JSP|org.apache.sling.scripting.jsp|2.3.0",
- "Scripting JSP API Wrapper|org.apache.sling.scripting.jsp-api|1.0.0",
- "Scripting JSP Taglib|org.apache.sling.scripting.jsp.taglib|2.2.6",
- "Scripting JST|org.apache.sling.scripting.jst|2.0.6",
- "Scripting Groovy|org.apache.sling.scripting.groovy|1.0.2",
- "Scripting HTL Compiler|org.apache.sling.scripting.sightly.compiler|1.0.8",
- "Scripting HTL Java Compiler|org.apache.sling.scripting.sightly.compiler.java|1.0.10",
- "Scripting HTL Engine|org.apache.sling.scripting.sightly|1.0.34",
- "Scripting HTL JavaScript Use Provider|org.apache.sling.scripting.sightly.js.provider|1.0.22",
- "Scripting HTL Sling Models Use Provider|org.apache.sling.scripting.sightly.models.provider|1.0.6",
- "Scripting HTL REPL|org.apache.sling.scripting.sightly.repl|1.0.4",
- "Scripting Thymeleaf|org.apache.sling.scripting.thymeleaf|1.1.0",
- "Security|org.apache.sling.security|1.1.2",
- "Service User Mapper|org.apache.sling.serviceusermapper|1.3.2",
- "Servlet Helpers|org.apache.sling.servlet-helpers|1.1.0",
- "Servlets Compat|org.apache.sling.servlets.compat|1.0.2",
- "Servlets Get|org.apache.sling.servlets.get|2.1.26",
- "Servlets Post|org.apache.sling.servlets.post|2.3.20",
- "Servlets Resolver|org.apache.sling.servlets.resolver|2.4.12",
- "Settings|org.apache.sling.settings|1.3.8",
- "Slf4j MDC Filter|org.apache.sling.extensions.slf4j.mdc|1.0.0",
- "Sling Query|org.apache.sling.query|3.0.0",
- "Superimposing Resource Provider|org.apache.sling.superimposing|0.2.0",
- "System Bundle Extension: Activation API|org.apache.sling.fragment.activation|1.0.2",
- "System Bundle Extension: WS APIs|org.apache.sling.fragment.ws|1.0.2",
- "System Bundle Extension: XML APIs|org.apache.sling.fragment.xml|1.0.2",
- "Tenant|org.apache.sling.tenant|1.1.0",
- "Testing Hamcrest|org.apache.sling.testing.hamcrest|1.0.2",
- "Testing JCR Mock|org.apache.sling.testing.jcr-mock|1.3.0",
- "Testing Logging Mock|org.apache.sling.testing.logging-mock|2.0.0",
- "Testing OSGi Mock|org.apache.sling.testing.osgi-mock|2.3.2",
- "Testing PaxExam|org.apache.sling.testing.paxexam|0.0.4",
- "Testing Resource Resolver Mock|org.apache.sling.testing.resourceresolver-mock|1.1.18",
- "Testing Sling Mock|org.apache.sling.testing.sling-mock|2.2.12",
- "Testing Sling Mock Jackrabbit|org.apache.sling.testing.sling-mock-jackrabbit|1.0.0",
- "Testing Sling Mock Oak|org.apache.sling.testing.sling-mock-oak|2.0.2",
- "Tooling Support Install|org.apache.sling.tooling.support.install|1.0.4",
- "Tooling Support Source|org.apache.sling.tooling.support.source|1.0.4",
- "Apache Sling Testing Clients|org.apache.sling.testing.clients|1.1.0",
- "Apache Sling Testing Rules|org.apache.sling.testing.rules|1.0.1",
- "Apache Sling Server Setup Tools|org.apache.sling.testing.serversetup|1.0.1",
- "Testing Tools|org.apache.sling.testing.tools|1.0.16",
- "URL Rewriter|org.apache.sling.urlrewriter|0.0.2",
- "Web Console Branding|org.apache.sling.extensions.webconsolebranding|1.0.2",
- "Web Console Security Provider|org.apache.sling.extensions.webconsolesecurityprovider|1.2.0",
- "XSS Protection|org.apache.sling.xss|2.0.0",
- "XSS Protection Compat|org.apache.sling.xss.compat|1.1.0"
-]
-
-// ------------------------------------------------------------------------------------------------
-// Utilities
-// ------------------------------------------------------------------------------------------------
-def downloadLink(label, artifact, version, suffix) {
- def sep = version ? "-" : ""
- def path = "sling/${artifact}${sep}${version}${suffix}"
- def digestsBase = "http://www.apache.org/dist/${path}"
-
- a(href:"[preferred]${path}", label)
- yield " ("
- a(href:"${digestsBase}.asc", "asc")
- yield ", "
- a(href:"${digestsBase}.md5", "md5")
- yield ")"
-}
-
-def tableHead(String [] headers) {
- thead() {
- tr() {
- headers.each { header ->
- th(header)
- }
- }
- }
-
-}
-
- // ------------------------------------------------------------------------------------------------
-// Downloads page layout
-// ------------------------------------------------------------------------------------------------
-layout 'layout/main.tpl', true,
- projects: projects,
- bodyContents: contents {
-
- div(class:"row"){
- div(class:"small-12 columns"){
- section(class:"wrap"){
- header{
- h1("${content.title}")
- }
- yieldUnescaped content.body
-
- h2("Sling Application")
- table(class:"table") {
- tableHead("Artifact", "Version", "Provides", "Package")
- tbody() {
- slingApplication.each { line ->
- tr() {
- def data = line.split("\\|")
- td(data[0])
- td(data[4])
- td(data[1])
- var artifact = "${data[2]}-${data[4]}${data[3]}"
- td(){
- downloadLink(artifact, artifact, "", "")
- }
- }
- }
- }
- }
-
- h2("Sling IDE Tooling")
- table(class:"table") {
- tableHead("Artifact", "Version", "Provides", "Update Site")
- tbody() {
- slingIDETooling.each { line ->
- tr() {
- def data = line.split("\\|")
- td(data[0])
- td(data[2])
- td(data[3])
- def artifact = "${data[1]}/${data[2]}"
- td(){
- downloadLink("Update site", artifact, "", "")
- }
- }
- }
- }
- }
-
- h2("Sling Components")
- table(class:"table") {
- tableHead("Artifact", "Version", "Binary", "Source")
- tbody() {
- bundles.each { line ->
- tr() {
- def data = line.split("\\|")
- td(data[0])
- td(data[2])
- def artifact = data[1]
- def version = data[2]
- td(){
- downloadLink("Bundle", artifact, version, ".jar")
- }
- td(){
- downloadLink("Source ZIP", artifact, version, "-source-release.zip")
- }
- }
- }
- }
- }
-
- h2("Maven Plugins")
- table(class:"table") {
- tableHead("Artifact", "Version", "Binary", "Source")
- tbody() {
- mavenPlugins.each { line ->
- tr() {
- def data = line.split("\\|")
- td(data[0])
- td(data[2])
- def artifact = data[1]
- def version = data[2]
- td(){
- downloadLink("Maven Plugin", artifact, version, ".jar")
- }
- td(){
- downloadLink("Source ZIP", artifact, version, "-source-release.zip")
- }
- }
- }
- }
- }
- }
- }
- }
- }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/feed.tpl
----------------------------------------------------------------------
diff --git a/templates/feed.tpl b/templates/feed.tpl
deleted file mode 100644
index 866cc73..0000000
--- a/templates/feed.tpl
+++ /dev/null
@@ -1,40 +0,0 @@
-xmlDeclaration()
-feed(xmlns:"http://www.w3.org/2005/Atom"){
-
- title("${config.blog_title}")
- newLine()
- link(href:"${config.site_host}${config.site_contextPath}")
- newLine()
- link(rel:"self", type:"application/atom+xml", href:"${config.site_host}${config.site_contextPath}${config.feed_file}")
- newLine()
- subtitle("${config.blog_subtitle}")
- newLine()
- updated("${published_date.format('yyyy-MM-dd\'T\'HH:mm:ss\'Z\'')}")
- newLine()
- id("tag:${config.feed_id},${published_date.format('yyyy:MM')}")
- newLine()
- published_posts.each {post ->
- entry{
- title("${post.title}")
- newLine()
- author{
- name("${post.author}")
- }
- newLine()
- link(href:"${config.site_host}${config.site_contextPath}${post.uri}")
- newLine()
- updated("${post.date.format('yyyy-MM-dd\'T\'HH:mm:ss\'Z\'')}")
- newLine()
- id("${config.site_host}${config.site_contextPath}${post.uri}")
- newLine()
- post.tags.each { tag ->
- category(term:"${tag}")
- newLine()
- }
- content(type:"html") {
- yield post.body
- }
- }
- newLine()
- }
-}
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/footer.tpl
----------------------------------------------------------------------
diff --git a/templates/footer.tpl b/templates/footer.tpl
deleted file mode 100644
index d7e9200..0000000
--- a/templates/footer.tpl
+++ /dev/null
@@ -1,10 +0,0 @@
-div(class:"footer") {
- div(class:"timestamp") {
- yield "TODO display revision number here"
- }
- div(class:"trademarkFooter") {
- yield "Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project "
- yield "logo are trademarks of The Apache Software Foundation. All other marks mentioned "
- yield "may be trademarks or registered trademarks of their respective owners."
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/header.tpl
----------------------------------------------------------------------
diff --git a/templates/header.tpl b/templates/header.tpl
deleted file mode 100644
index dbd75e9..0000000
--- a/templates/header.tpl
+++ /dev/null
@@ -1,21 +0,0 @@
-meta(charset:"utf-8") newLine()
-
-title("${config.blog_title}") newLine()
-
-// For now, try to reproduce the layout of the current website, to be able to compare pages
-
-link(rel:"stylesheet", href:"${config.site_contextPath}res/css/site.css") newLine()
-link(rel:"stylesheet", href:"${config.site_contextPath}res/css/codehilite.css") newLine()
-
-div(class:"title") {
- div(class:"logo") {
- a(href:"http://sling.apache.org") {
- img(border:"0", alt:"Apache Sling", src:"${config.site_contextPath}res/logos/sling.svg")
- }
- }
- div(class:"header") {
- a(href:"http://www.apache.org") {
- img(border:"0", alt:"Apache", src:"${config.site_contextPath}res/logos/apache.png")
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/index.tpl
----------------------------------------------------------------------
diff --git a/templates/index.tpl b/templates/index.tpl
deleted file mode 100644
index 4505ca8..0000000
--- a/templates/index.tpl
+++ /dev/null
@@ -1,19 +0,0 @@
-layout 'layout/main.tpl', true,
- projects: projects,
- bodyContents: contents {
-
-// TODO our "news" section might work like that? with posts tagged as "news"?
-// published_posts[0..2].each { post ->
-// model.put('post', post)
-// include template: 'post-brick.tpl'
-// }
-
- div(class:"row"){
- div(class:"small-12 columns"){
- hr()
- yield "Older post are available in the "
- a(href:"${config.site_contextPath}${config.archive_file}","archive")
- }
- }
-
- }
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/layout/main.tpl
----------------------------------------------------------------------
diff --git a/templates/layout/main.tpl b/templates/layout/main.tpl
deleted file mode 100644
index 677b783..0000000
--- a/templates/layout/main.tpl
+++ /dev/null
@@ -1,21 +0,0 @@
-yieldUnescaped '<!DOCTYPE html>'
-html(lang:'en'){
-
- head {
- include template: "header.tpl"
- }
-
- body() {
-
- include template: 'menu.tpl'
-
- div(class:"main") {
- bodyContents()
-
- newLine()
- include template: 'footer.tpl'
- newLine()
- }
- }
-}
-newLine()
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/menu.tpl
----------------------------------------------------------------------
diff --git a/templates/menu.tpl b/templates/menu.tpl
deleted file mode 100644
index a744f7f..0000000
--- a/templates/menu.tpl
+++ /dev/null
@@ -1,53 +0,0 @@
-// TODO read links from a Markdown or other definition file?
-div(class:"menu"){
-
-strong(){a(href:"${config.site_contextPath}documentation.html", "Documentation")} br()
-a(href:"${config.site_contextPath}documentation/getting-started.html", "Getting Started") br()
-a(href:"${config.site_contextPath}documentation/the-sling-engine.html", "The Sling Engine") br()
-a(href:"${config.site_contextPath}documentation/development.html", "Development") br()
-a(href:"${config.site_contextPath}documentation/bundles.html", "Bundles") br()
-a(href:"${config.site_contextPath}documentation/tutorials-how-tos.html", "Tutorials & How-Tos") br()
-a(href:"${config.site_contextPath}documentation/configuration.html", "Configuration")
-
-p(){}
-a(href:"http://s.apache.org/sling.wiki", "Wiki") br()
-a(href:"http://s.apache.org/sling.faq", "FAQ") br()
-
-p(){}
-strong("API Docs") br()
-a(href:"${config.site_contextPath}apidocs/sling9/index.html", "Sling 9") br()
-a(href:"${config.site_contextPath}apidocs/sling8/index.html", "Sling 8") br()
-a(href:"${config.site_contextPath}apidocs/sling7/index.html", "Sling 7") br()
-a(href:"${config.site_contextPath}apidocs/sling6/index.html", "Sling 6") br()
-a(href:"${config.site_contextPath}apidocs/sling5/index.html", "Sling 5") br()
-a(href:"${config.site_contextPath}javadoc-io.html", "Archive at javadoc.io") br()
-
-p(){}
-strong("Project info") br()
-a(href:"${config.site_contextPath}downloads.cgi", "Downloads") br()
-a(href:"http://www.apache.org/licenses/", "License") br()
-a(href:"${config.site_contextPath}contributing.html", "Contributing") br()
-a(href:"${config.site_contextPath}news.html", "News") br()
-a(href:"${config.site_contextPath}links.html", "Links") br()
-a(href:"${config.site_contextPath}project-information.html", "Project Information") br()
-a(href:"https://issues.apache.org/jira/browse/SLING", "Issue Tracker") br()
-a(href:"http://ci.apache.org/builders/sling-trunk", "Build Server") br()
-a(href:"${config.site_contextPath}project-information/security.html", "Security") br()
-
-p(){}
-strong("Source") br()
-a(href:"http://svn.apache.org/viewvc/sling/trunk", "Subversion") br()
-a(href:"git://git.apache.org/sling.git", "Git") br()
-a(href:"https://github.com/apache/sling", "Github Mirror") br()
-
-p(){}
-strong("Sponsorship") br()
-a(href:"http://www.apache.org/foundation/thanks.html", "Thanks") br()
-a(href:"http://www.apache.org/foundation/sponsorship.html", "Become a Sponsor") br()
-a(href:"https://donate.apache.org/", "Donate!") br()
-a(href:"http://www.apache.org/foundation/buy_stuff.html", "Buy Stuff") br()
-
-p(){}
-strong(){a(href:"${config.site_contextPath}sitemap.html", "Site Map")}
-}
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/page.tpl
----------------------------------------------------------------------
diff --git a/templates/page.tpl b/templates/page.tpl
deleted file mode 100644
index 3cb90cb..0000000
--- a/templates/page.tpl
+++ /dev/null
@@ -1,16 +0,0 @@
-layout 'layout/main.tpl', true,
- projects: projects,
- bodyContents: contents {
-
- div(class:"row"){
- div(class:"small-12 columns"){
- section(class:"wrap"){
- header{
- h1("${content.title}")
- }
- yieldUnescaped content.body
- }
- }
- }
-
- }
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/post-brick.tpl
----------------------------------------------------------------------
diff --git a/templates/post-brick.tpl b/templates/post-brick.tpl
deleted file mode 100644
index 38d537e..0000000
--- a/templates/post-brick.tpl
+++ /dev/null
@@ -1,30 +0,0 @@
-div(class:"row"){
- div(class:"small-12 middle-12 large-12 columns"){
- article(class:"wrap"){
- header{
- div(class:"row"){
- div(class:"small-3 medium-1 large-1 columns"){
- include template: 'date-brick.tpl'
- }
-
- div(class:"small-9 medium-11 large-11 columns"){
-
- div{
- h2{
- a(href:"${config.site_contextPath}${post.uri}","${post.title}")
- }
- include template: 'tags-brick.tpl'
- hr()
- }
- }
- }
- }
-
- div(class:"row"){
- div(class:"small-9 small-offset-3 medium-11 medium-offset-1 large-11 large-offset-1 columns"){
- yieldUnescaped post.body
- }
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/post.tpl
----------------------------------------------------------------------
diff --git a/templates/post.tpl b/templates/post.tpl
deleted file mode 100644
index c4b8d09..0000000
--- a/templates/post.tpl
+++ /dev/null
@@ -1,7 +0,0 @@
-model.put("projects",projects)
-layout 'layout/main.tpl', true,
- bodyContents: contents {
- p("TODO this is the post template")
- model.put('post', content)
- include template: 'post-brick.tpl'
- }
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/project.tpl
----------------------------------------------------------------------
diff --git a/templates/project.tpl b/templates/project.tpl
deleted file mode 100644
index 2e118ce..0000000
--- a/templates/project.tpl
+++ /dev/null
@@ -1,55 +0,0 @@
-layout 'layout/main.tpl', true,
- projects: projects,
- bodyContents: contents {
-
- div(class:"row"){
- div(class:"small-12 columns"){
- section(class:"wrap"){
- header{
- h2("${content.title}")
-
- time(datetime:"${content.date.format('yyyy-MM-dd')}"){
- small("${content.date.format('dd.MM.yyyy')}")
- }
- hr()
- }
- div(class:"row"){
- div(class:"small-12 columns"){
- div(class:"project-meta"){
- dl{
- dt{
- strong("website")
- }
- dd{
- a(href:"${content.website}", "$content.website")
- }
-
- dt{
- strong("gitHub")
- }
- dd{
- a(href:"${content.github}","$content.github")
- }
-
- dt{
- strong("git")
- }
- dd{
- code {
- yieldUnescaped "git clone $content.git"
- }
- }
- }
- }
- }
- }
- div(class:"row"){
- div(class:"small-12 columns"){
- yieldUnescaped content.body
- }
- }
- }
- }
- }
-
- }
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/sitemap.tpl
----------------------------------------------------------------------
diff --git a/templates/sitemap.tpl b/templates/sitemap.tpl
deleted file mode 100644
index 6b07c59..0000000
--- a/templates/sitemap.tpl
+++ /dev/null
@@ -1,9 +0,0 @@
-xmlDeclaration()
-urlset( xmlns:'http://www.sitemaps.org/schemas/sitemap/0.9', 'xmlns:xsi':'http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation':'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd'){
- published_content.each {content ->
- url {
- loc("${config.site_host}${config.site_contextPath}${content.uri}")
- lastmod("${content.date.format('yyyy-MM-dd')}")
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/tags-brick.tpl
----------------------------------------------------------------------
diff --git a/templates/tags-brick.tpl b/templates/tags-brick.tpl
deleted file mode 100644
index e9bba23..0000000
--- a/templates/tags-brick.tpl
+++ /dev/null
@@ -1,10 +0,0 @@
-p {
- def contextPath = "${config.site_contextPath}"
- post.tags.each { tag ->
- tag = tag.trim()
-
- span{
- a(href:"${contextPath}tags/${tag.replace(' ','-')}.html", class:"label","${tag}")
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/templates/tags.tpl
----------------------------------------------------------------------
diff --git a/templates/tags.tpl b/templates/tags.tpl
deleted file mode 100644
index 97d88d1..0000000
--- a/templates/tags.tpl
+++ /dev/null
@@ -1,5 +0,0 @@
-layout 'layout/main.tpl', true,
- projects: projects,
- bodyContents: contents {
- p("TODO - blog tag rendering disabled as it failed")
- }
[34/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/tutorials-how-tos/installing-and-upgrading-bundles.html
----------------------------------------------------------------------
diff --git a/documentation/tutorials-how-tos/installing-and-upgrading-bundles.html b/documentation/tutorials-how-tos/installing-and-upgrading-bundles.html
new file mode 100644
index 0000000..90cd71d
--- /dev/null
+++ b/documentation/tutorials-how-tos/installing-and-upgrading-bundles.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Installing and Upgrading Bundles</h1></header><p>Excerpt: Explains how to install, upgrade and uninstall Bundles using the Sling Management console.</p>
+<div class="note">
+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 <a href="http://felix.apache.org/site/apache-felix-web-console.html">Apache Felix Web Console</a>.
+</div>
+<p>OSGi bundles installed in the OSGi framework, which is provided by Sling, may be upgraded or removed and new bundles may be installed by using the Sling Management Console. This page is about using the Sling Management Console for those tasks.</p>
+<p>Basically, you have two choices to install and upgrade bundles: Upload the bundle files or install them from a Bundle Repository.</p>
+<h2>Sling Management Console</h2>
+<p>The Sling Management Console is installed by default when Sling is running and may be reached at on the page <code>/system/console</code> in the Sling Context by default. For example if you installed the Sling Web Application in the <code>/sample</code> context of the Servlet Container running at <code>http://somehost:4402</code>, you would access the Sling Management Console at <code>http://somehost:4402/sample/system/console</code>.</p>
+<p>You will be prompted for a user name and password to access the Sling Management Console. This password is preset to be <em>admin</em> for the user name and <em>admin</em> for the password.</p>
+<p>NB: Both the username and password and the location of the Sling Management Console inside the Web Application Context is configurable in the <em>Sling Management Console</em> configuration on the <em>Configuration</em> page.</p>
+<h2>Installing and upgrading bundles by Upload</h2>
+<p>To install a new bundle or upgrade an already installed bundle, go to the <em>Bundles</em> page in the Sling Management Console. At the top and the bottom of the page you have a form to specify and upload a bundle as a file :</p>
+<ul>
+ <li>Select the bundle file to upload</li>
+ <li>Click the <em>Start</em> checkbox, if you want to start the bundle after installation. If the bundle is upgraded, this checkbox is ignored.</li>
+ <li>Specify the start level of the bundle in the <em>Start Level</em> field. This must be a number higher than 0 and is ignored for bundles, which are already installed. Most of the time, you will use the default value.</li>
+ <li>Click the <em>Install or Update</em> button</li>
+</ul>
+<p>After clicking the button, the bundle file will be uploaded. If a bundle with the same bundle symbolic name is already installed, the respective bundle will be updated with the new bundle file. Otherwise the bundle file will be installed as a new bundle and its start level is set as defined. Additionally the bundle will optionally be started.</p>
+<p>After having updated a bundle, you should also refresh the packages by clicking on the <em>Refresh Packages</em> button. The reson for this is, that the old version of the bundle is still used by other bundles even after upgrading to a new version. Only when the packages are refreshed any users of the bundle will be relinked to use the new bundle version. As this might be a somewhat lengthy operation, which also stops and restarts using bundles, this operation has to be executed explicitly.</p>
+<p>Also, if you plan to upgrade multiple bundles, you may wish to upgrade all bundles before repackaging the using bundles.</p>
+<h2>Installing and upgrading bundles from the Bundle Repository</h2>
+<p>The OSGi Bundle Repository is a repository of bundles, from which Sling may download and install or upgrade bundles very easily. Unlike the installation of bundles by file upload, the OSGi Bundle Repository has the functionality to resolve and dependencies of bundles to be installed.</p>
+<p>Say you wish to install bundle <em>X</em> which depends on packages provided by bundle <em>Y</em>. When uploading bundle <em>X</em> as a file it will not resolve, that is Sling (the OSGi framework actually) is not able to ensure proper operation of bundle <em>X</em> and thus prevents the bundle from being started and used. You will have to manually upload bundle <em>Y</em> yourself. When using the OSGi Bundle Repository, you just select bundle <em>X</em> for installation and the bundle repository will find out, that bundle <em>Y</em> is also required and will automatically download and install it along with bundle <em>X</em>.</p>
+<h3>The Bundle Repository page</h3>
+<p>Installation or update of bundles may be done on the <em>Bundle Repository</em> page of the Sling Management Console. In the upper part of the page, you will see a list (usually just a single entry) of OSGi Bundle Repositories known to Sling. In the lower part of the list you see the bundles available from these repositories. To install or update bundles, just check the respective button and click on the <em>Deploy Selected</em> or <em>Deploy and Start Selected</em> button at the bottom of the page depending on whether you want to start the bundle(s) after installation or not.</p>
+<p>See below for more information on OSGi Bundle Repository management.</p>
+<h3>The Bundles page</h3>
+<p>You may also want to upgrade already installed bundles from the <em>Bundles</em> page of the Sling Management Console. For each bundle listed in this page, there is an <em>Upgrade</em> button. If there is an upgrade to the installed bundle available in the OSGi Bundle Repository, the button is enabled and clicking on the button will upgrade the respective bundle. If no upgrade is available from the OSGi Bundle Repository, this button is disabled.</p>
+<h3>Managing OSGi Bundle Repositories</h3>
+<p>Currently management of known OSGi Bundle Repositories is very simple. If a configured bundle repository is not available on startup, it will be marked as being inactive. If you know the repository is now available, you may click on the <em>Refresh</em> button, to activate it. Similarly, the contents of the repository may be modified by for example adding new bundles or updating bundles in the repository, these changes will be made known to Sling by clicking the <em>Refresh</em> button.</p>
+<p>There exists no GUI functionality yet to add a new repository to the list of known repositories. Instead you may submit a request with parameters <code>action</code> whose value must be <code>refreshOBR</code> and <code>repository</code> whose value must be the URL to the repository descriptor file generally called <code>repository.xml</code>.</p>
+<p>For example, if you run Sling on <code>http://localhost:7402/sample</code> with default location of the Sling Management Console, the following request would add a repository at <code>/tmp/repo/repository.xml</code> in the filesystem:</p>
+<p>:::html http://localhost:7402/sample/system/console/bundlerepo?action=refreshOBR&repository=file:///tmp/repo/repository.xml</p>
+<p>Note: Only use <code>file:</code> URLs if you know Sling has access to the named file !</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/tutorials-how-tos/jackrabbit-persistence.html
----------------------------------------------------------------------
diff --git a/documentation/tutorials-how-tos/jackrabbit-persistence.html b/documentation/tutorials-how-tos/jackrabbit-persistence.html
new file mode 100644
index 0000000..cd3ab79
--- /dev/null
+++ b/documentation/tutorials-how-tos/jackrabbit-persistence.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Jackrabbit Persistence</h1></header><p>Out-of-the-box the embedded Jackrabbit repository used by Sling (the Embedded Jackrabbit Repository bundle) uses Derby to persist the JCR nodes and properties. For some applications or environments it may be required or required to replace Derby with another backing store such as PostgreSQL or Oracle.</p>
+<p>This page is based on the journey of Tony Giaccone to get Sling running with a PostgreSQL based Jackrabbit instance.</p>
+<h2>Management Summary</h2>
+<p>To replace Derby as the persistence manager for Jackrabbit the following steps are required:</p>
+<ol>
+ <li>Provide a JDBC driver for your database as an OSGi bundle</li>
+ <li>Reconfigure Jackrabbit to use your database</li>
+ <li>(Re-) Start the Embedded Jackrabbit bundle</li>
+</ol>
+<p>When you are not using the Derby persistence manager, you may safely remove the Derby bundle from your Sling instance.</p>
+<h2>JDBC Driver</h2>
+<p>The hardest thing to do is probably getting the JDBC driver for your database. One option is to look at the bundles provided by Spring Source in their repository at <a href="http://www.springsource.com/repository/">http://www.springsource.com/repository/</a>.</p>
+<p>Another option is to create the bundle on your own using Peter Kriens' <a href="http://bnd.bndtools.org/">bnd Tool</a>:</p>
+<ol>
+ <li>Get the JDBC driver for your database from the driver provider</li>
+ <li>Wrap the JDBC driver library into an OSGi bundle:</li>
+</ol>
+<p>:::sh</p>
+<h1>Example for PostgreSQL JDBC 3 driver 8.4-701</h1>
+<p>$ java -jar bnd.jar wrap postgresql-8.4-701.jdbc3.jar $ mv postgresql-8.4-701.jdbc3.bar postgresql-8.4-701.jdbc3-bnd.jar</p>
+<ol>
+ <li>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)</li>
+</ol>
+<p>:::sh $ mvn install:install-file -DgroupId=postgresql -DartifactId=postgresql -Dversion=8.4.701.jdbc3 -Dpackaging=jar -Dfile=postgresql-8.4-701.jdbc3-bnd.jar</p>
+<p>Tony reports no success with the Spring Source bundle, whily the bnd approach worked for the PostgreSQL JDBC driver.</p>
+<h2>Replace Derby in a running Sling Instance</h2>
+<p>To replace Derby in a running Sling instance follow these steps (e.g. through the Web Console at <code>/system/console</code>):</p>
+<ol>
+ <li>Uninstall the Apache Derby bundle</li>
+ <li>Install the JDBC bundle prepared in the first step</li>
+ <li>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.</li>
+ <li>Refresh the packages (click the <em>Refresh Packages</em> button)</li>
+</ol>
+<p>Alternatively, you may wish to stop Sling after uninstalling Derby and installing the JDBC bundle. Technically, this is not required, though.</p>
+<h2>Reconfiguring Jackrabbit</h2>
+<p>To actually use a persistence manager other than the default (Derby) persistence manager, you have to configure Jackrabbit to use it. Create a <code>repository.xml</code> file in the <code>sling/jackrabbit</code> folder before starting Sling for the first time. If the repository was already started, you can also modify the existing file.</p>
+<p>To prepare a repository.xml file before first startup, use the <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/repository.xml"><code>repository.xml</code></a> as a template and modify it by replacing the <code><PersistenceManager></code> elements to refer to the selected persistence manager.</p>
+<p>If the file already exists, you can modifiy this existing file and there is no need to get the original from the SVN repository.</p>
+<p>For example to use PostgreSQL instead of Derby modify the <code><PersistenceManager></code> elements as follows:</p>
+<p>:::xml <Repository> ... <Workspace name="${wsp.name}"> ... <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> ... </Workspace></p>
+<p><Versioning rootPath="${rep.home}/version"> ... <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> </Versioning> ... </Repository></p>
+<p>Modify the <code>url</code>, <code>user</code>, and <code>password</code> parameters to match your database setup.</p>
+<p>If you reconfigure Jackrabbit to use the new persistence manager, the existing repository data in the <code>sling/jackrabbit</code> directory, except the <code>repository.xml</code> file, of course, should now be removed.</p>
+<p>Finally either start Sling or start the Jackrabbit Embedded Repository bundle.</p>
+<h2>Credits</h2>
+<p>This description is based on Tony Giaccone's description <a href="http://markmail.org/message/wlbfrukmjjsl33hh">Swapping Postgres for Derby</a> sent to the Sling Users mailing list.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/tutorials-how-tos/testing-sling-based-applications.html
----------------------------------------------------------------------
diff --git a/documentation/tutorials-how-tos/testing-sling-based-applications.html b/documentation/tutorials-how-tos/testing-sling-based-applications.html
new file mode 100644
index 0000000..942dfd5
--- /dev/null
+++ b/documentation/tutorials-how-tos/testing-sling-based-applications.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Testing Sling-based applications</h1></header><p>Automated testing of OSGi components and services can be challenging, as many of them depend on other services that must be present or simulated for testing.</p>
+<p>This page describes the various approaches that we use to test Sling itself, and introduces a number of tools that can help testing OSGi and HTTP-based applications.</p>
+<p>[TOC]</p>
+<h2>Unit tests</h2>
+<p>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.</p>
+<p>We have quite a lot of those in Sling, the older use the JUnit3 TestCase base class, and later ones use JUnit4 annotations. Mixing both approaches is possible, there's no need to rewrite existing tests.</p>
+<h2>Tests that use a JCR repository</h2>
+<p>Utility classes from our <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/testing">commons/testing</a> module make it easy to get a real JCR repository for testing. That's a bit slower than pure unit tests, of course, but this only adds 1-2 seconds to the execution of a test suite.</p>
+<p>The <code>RepositoryProviderTest</code> in that module uses this technique to get a JCR repository.</p>
+<p>Note that our utilities do not cleanup the repository between tests, so you must be careful about test isolation, for example by using unique paths for each test.</p>
+<h2>Mock classes and services</h2>
+<p>The next step is to use mock classes and services to simulate components that are needed for testing. This makes it possible to test OSGi service classes without an OSGi framework, or classes accessing the Sling or JCR API without a running Sling instance or JCR repository.</p>
+<p>The <a href="/documentation/development.html">Development</a> documentation page contains a section "Testing Sling-based Applications" lising all mock implementations available as part of the Apache Sling project.</p>
+<p>In other cases we use <a href="http://www.jmock.org/">jmock</a> or <a href="https://code.google.com/p/mockito/">Mockito</a> to help create mock objects without having to write much code - such mocking libraries take care of the plumbing and allow you to write just the bits of code that matter (often with funny syntaxes). The tests of the <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/event/">org.apache.sling.event</a> bundle, for example, make extensive use of such mock services.</p>
+<p>The problem with mocks is that it can become hard to make sure you're actually testing something, and not just "mocking mocks". At a certain level of complexity, it becomes quicker and clearer to actually start an OSGi framework for automated tests.</p>
+<h3>Side note: injecting services in private fields</h3>
+<p>To inject (real or fake) services in others for testing, without having to create getters and setters just for this, you could use a reflection-based trick, as in the below example. Utilities such as the <a href="http://junit-addons.sourceforge.net/junitx/util/PrivateAccessor.html">PrivateAccessor</a> from <a href="http://junit-addons.sourceforge.net/">junit-addons</a> make that simpler.</p>
+<h1>!java</h1>
+<p>// set resource resolver factory // in a ServletResolver object which has a private resourceResolverFactory field</p>
+<p>ServletResolver servletResolver = .... Class<?> resolverClass = servletResolver.getClass().getSuperclass(); final java.lang.reflect.Field resolverField = resolverClass.getDeclaredField("resourceResolverFactory"); resolverField.setAccessible(true); resolverField.set(servletResolver, factory);</p>
+<h2>Pax Exam</h2>
+<p><a href="http://team.ops4j.org/wiki/display/paxexam/Pax+Exam">Pax Exam</a> allows you to easily start an OSGi framework during execution of a JUnit test suite.</p>
+<p>We currently use it for our <a href="https://svn.apache.org/repos/asf/sling/trunk/installer/it">Sling installer integration tests</a> for example. As parts of the installer interact directly with the OSGi framework, it felt safer to test it in a realistic situation rather than mock everything.</p>
+<p>Such tests are obviously slower than plain unit tests and tests that use mocks. Our installer integration tests, using Pax Exam, take about a minute to execute on a 2010 macbook pro.</p>
+<h2>Server-side JUnit tests</h2>
+<p>The tools described on the <a href="/documentation/bundles/org-apache-sling-junit-bundles.html">JUnit server-side testing support</a> page allow for running JUnit tests on an live Sling instance, as part of the normal integration testing cycle.</p>
+<h2>HTTP-based integration tests</h2>
+<p>The <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/junit/rules">Sling HTTP Testing Rules</a> allow writing integration tests easily. They are primarily meant to be used for tests that use http against a Sling instance and make use of the <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/http/clients">org.apache.sling.testing.clients</a> which offer a simple, immutable and extendable way of working with specialized testing clients.</p>
+<p>The JUnit rules incorporate boiler-plate logic that is shared in tests and take the modern approach of using rules rather than inheritance. The <code>SlingRule</code> (for methods) or <code>SlingClassRule</code> (for test classes) are base rules, chaining other rules like <code>TestTimeoutRule</code>, <code>TestDescriptionRule</code>, <code>FilterRule</code>. The <code>SlingInstanceRule</code> extends that and starts a Sling instance if needed and also allows instantiating a <code>SlingClient</code> pointing to the instance and automatically configure the base url, credentials, etc.</p>
+<h3><a name="starting"></a> Starting an Integration Test</h3>
+<p>Starting an integration is very simple out of the box, but is very extendable, both by combining or configuring the junit rules and by using the versatile <code>SlingClient</code> (which can be extended or adapted by calling <code>adaptTo(MyClient.class)</code> without losing the client configuration)</p>
+<p>The <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/junit/rules/README.md">README</a> provides more detail, as do <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/junit/rules/src/test/java">the tests</a>. The <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/http/clients">Sling HTTP Testing Clients</a> provide simple explanations, and unit tests.</p>
+<h4>Maven Dependency</h4>
+<h1>!xml</h1>
+<p><dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.rules</artifactId> <version>0.1.0-SNAPSHOT</version> </dependency></p>
+<h4>Simple Example using SlingInstanceRule</h4>
+<h1>!java</h1>
+<p>public class MySimpleIT {</p>
+<p>@ClassRule public static SlingInstanceRule instanceRule = new SlingInstanceRule();</p>
+<p>@Rule public SlingRule methodRule = new SlingRule(); // will configure test timeout, description, etc.</p>
+<p>@Test public void testCreateNode() { SlingClient client = instanceRule.getAdminClient(); 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); } }</p>
+<h2>Summary</h2>
+<p>Combining the above testing techniques has worked well for us in creating and testing Sling. Being able to test things at different levels of integration has proved an efficient way to get good test coverage without having to write too much boring test code.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
[12/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/news.md
----------------------------------------------------------------------
diff --git a/content/news.md b/content/news.md
deleted file mode 100644
index 98dc445..0000000
--- a/content/news.md
+++ /dev/null
@@ -1,490 +0,0 @@
-title=News
-type=page
-status=published
-~~~~~~
-
-* New Releases: [Apache Sling 9](/news/sling-launchpad-9-released.html), Apache Sling Launchpad Testing 9, Apache Sling Launchpad Testing WAR version 9, Apache Sling Launchpad Testing Fragment Bundle 2.0.12, Apache Sling Launchpad Testing Services 2.0.12, Apache Sling Launchpad Test Bundles 0.0.2, Apache Sling Launchpad Testing Services WAR 2.0.12, Apache Sling Integration Tests 1.0.4 ( June 12S , 2017 )
-* New Releases: Apache Sling JUnit Core 1.0.26, Testing Clients 1.1.0, JUnit Remote Test Runners 1.0.12, Tooling Support Install 1.0.4, and Tooling Support Source 1.0.4 (June 6th, 2017)
-* New Releases: Apache Sling Resource Inventory 1.0.8, Content Distribution Core 0.2.8, Testing Sling Mock 2.2.12, Log Tracer 1.0.4, and Commons Metrics 1.2.2 (June 6th, 2017)
-* New Releases: Apache Sling JCR Content Parser 1.2.2, JCR ContentLoader 2.2.4, File System Resource Provider 2.1.4, File System Resource Provider 1.4.4, Maven Sling Plugin 2.3.0 (June 2nd, 2017)
-* New Release: Apache Sling SLF4J Implementation (Logback) 5.0.2 (June 1st, 2017)
-* New Release: Apache Sling JCR Resource 3.0.2 (May 31st, 2017)
-* New Releases: Apache Sling JCR Content Parser 1.2.0, File System Resource Provider 2.1.2, File System Resource Provider 1.4.2, Maven Sling Plugin 2.2.2, Context-Aware Configuration SPI 1.3.2, Context-Aware Configuration Impl 1.4.2, Context-Aware Configuration Mock Plugin 1.3.0, Launchpad Content 2.0.12 (May 29th, 2017)
-* New Releases: Apache Sling Servlet Post 2.3.20, JCR Contentloader 2.2.2, Launchpad Base 5.6.4-2.6.18 (May 28th, 2017)
-* New Releases: Apache Sling Service User Mapper 1.3.2, Apache Sling JCR Base Bundle 3.0.2, Apache Sling Web Console Branding 1.0.2 and Apache Sling Engine Implementation 2.6.8 (May 22nd, 2017)
-* New Releases: Apache Sling Servlets Get 2.1.26 and Apache Sling Servlets Post 2.3.18 (May 19th, 2017)
-* New Releases: Apache Sling Commons Scheduler 2.6.2 and Apache Sling Installer Core 3.8.10 (May 18th, 2017)
-* New Releases: Apache Sling Models Impl 1.4.2, Testing OSGi Mock 2.3.2, OSGi Mock 1.9.6, Sling Mock 2.2.10, Sling Mock 1.9.8, Apache Sling Auth Core 1.3.24 (May 15th, 2017)
-* New Release: Apache Sling JUnit Scriptable Tests Provider 1.0.12 (May 12th, 2017)
-* New Release: Apache Sling XSS Protection Compat Bundle 1.1.0 (May 11th, 2017)
-* New Release: Apache Sling Scripting JavaScript 3.0.0 (May 11th, 2017)
-* New Releases: Apache Sling Junit Core 1.0.24, Junit Teleporter 1.0.14, and Testing Tools 1.0.16 (May 11th, 2017)
-* New Release: Apache Sling Adapter 2.1.10 (May 11th, 2017)
-* New Releases: Apache Sling Servlets Get 2.1.24, Servlets Post 2.3.16, and JCR Jackrabbit Access Manager 3.0.0 (May 11th, 2017)
-* New Releases: Apache Sling Healthcheck API 1.0.0 and Core 1.2.8 (May 11th, 2017)
-* New Releases: Apache Sling Discovery Commons 1.0.20, Base 2.0.0, Impl 1.2.12, and Oak 1.2.18 (May 11th, 2017)
-* New Releases: Apache Sling Scripting HTL Java Compiler 1.0.10, Apache Sling Scripting HTL Engine 1.0.34, Apache Sling Scripting HTL JS Use Provider 1.0.22 , Apache Sling Servlets Resolver 2.4.12 (May 9th, 2017)
-* New Release: Apache Sling Installer Core 3.8.8 (May 8th, 2017)
-* New Releases: Apache Sling JCR ContentLoader 2.2.0, Pax Exam Utilities 1.0.4, Apache Sling File System Resource Provider 2.1.0, File System Resource Provider 1.4.0, JCR Content Parser 1.1.0 (May 8th, 2017)
-* New Releases: Apache Sling XSS Protection Bundle 2.0.0, XSS Protection Compat Bundle 1.0.0, Sling Resource Resolver 1.5.24, Context-Aware Configuration Impl 1.4.0, Context-Aware Configuration Mock Plugin 1.2.0, Testing JCR Mock 1.3.0, OSGi Mock 2.3.0, Sling Mock 2.2.8 (May 5th, 2017)
-* New Releases: Apache Sling Models API 1.3.4 and Models Implementation 1.4.0 (May 1st, 2017)
-* New Release: Apache Sling JCR Installer Provider 3.1.26 (May 1st, 2017)
-* New Release: Apache Sling JCR Resource 3.0.0 (May 1st, 2017)
-* New Release: Apache Sling Sling Slingstart Maven Plugin 1.7.4, Apache Sling Service User Mapper 1.3.0, Apache Sling Scripting API 2.2.0 and Tooling Support Source 1.0.2 (May 1th, 2017)
-* New Release: Apache Sling Commons Johnzon 1.0.0 (April 29th, 2017)
-* New Release: Apache Sling Event API 1.0.0 (April 19th, 2017)
-* New Releases: Apache Sling Validation API and Core 1.0.0 (April 12th, 2017)
-* New Release: Apache Sling Testing ResourceResolver Mock 1.1.18 (April 4th, 2017)
-* New Release: Apache Sling JCR Jackrabbit User Manager 2.2.6 (April 3rd, 2017)
-* New Releases: Apache Sling Resource Resolver 1.5.22 and Apache Sling Service User Mapper 1.2.6, Apache Sling Testing Sling Mock 2.2.6, Sling Mock 1.9.6, Sling Mock Oak 1.0.2, Context-Aware Configuration Implementation 1.3.2, File System Resource Provider 2.0.0, File System Resource Provider 1.3.0 (March 30th, 2017)
-* New Releases: Apache Sling CAConfig SPI 1.3.0, CAConfig Impl 1.3.0, CAConfig Mock Plugin 1.1.0, Apache Sling Maven Sling Plugin 2.2.0 (March 24th, 2017)
-* New Releases: Apache Sling JCR Content Parser 1.0.0, Testing OSGi Mock 2.2.4, Testing OSGi Mock 1.9.4 (March 23th, 2017)
-* New Releases: Apache Sling Commons JSON 2.0.20, Apache Sling Karaf repoinit 0.2.0, Apache Sling Scripting JSP API Wrapper 1.0.0, Apache Sling Scripting JSP EL Wrapper 1.0.0, Apache Sling Scripting JSP 2.3.0, Apache Sling Testing PaxExam 0.0.4, Apache Sling JCR Oak Server 1.1.4, Apache Sling Scripting Thymeleaf 1.1.0, Apache Sling Resource Presence 0.0.2 (March 20th, 2017)
-* New Releases: Apache Sling Resource Resolver 1.5.20, Apache Sling JCR Repoinit 1.1.4 (March 13th, 2017)
-* New Releases: Apache Sling i18n 2.5.8, Apache Sling JCR Installer 3.1.24, Apache Sling XSS 1.0.18, Apache Sling HTL JavaScript Use Provider 1.0.20, Apache Sling Scripting Core 2.0.46, Apache Sling Health Check Core 1.2.6, Apache Sling Event 4.2.2, Apache Sling Distributed Event Admin 1.1.2 (March 8th, 2017)
-* New Releases: Apache Sling Content Distribution Core 0.2.6, Apache Sling Installer Health Checks 1.0.0, Apache Sling Parent 30 (Mar 6th, 2017)
-* New Releases: Apache Sling Scripting HTL Compiler 1.0.8, Apache Sling Scripting HTL Engine 1.0.32 (March 2nd, 2017)
-* New Release: Apache Sling Commons Classloader 1.4.0, Apache Sling Commons File System Classloader 1.0.6 (Mar 1st, 2017)
-* New Release: Apache Sling Resource Resolver 1.5.14 (Feb 28th, 2017)
-* New Release: Apache Sling JUnit Tests Teleporter 1.0.12 (Feb 28th, 2017)
-* New Release: Apache Slingstart Maven Plugin 1.7.2 (Feb 28th, 2017)
-* New Release: Apache Sling Installer Core 3.8.6 (Feb 20th, 2017)
-* New Release: Apache Sling Content Distribution Core 0.2.4 (Feb 20th, 2017)
-* New Release: Apache Sling Content Distribution Core 0.2.0 (Feb 14th, 2017)
-* New Release: Apache Sling Servlets GET 2.1.22 (Feb 12th, 2017)
-* New Release: Apache Sling Resource Merger 1.3.2 (Feb 8th, 2017)
-* New Releases: Apache Sling DavEx Access to repositories 1.3.8, Apache Sling Simple WebDAV Access to repositories 2.3.8 (Feb 8th, 2017)
-* New Release: Apache Sling Launchpad Base 2.6.16 (Feb 5th, 2017)
-* New Release: Apache Sling Servlets GET 2.1.20 (Feb 3rd, 2017)
-* New Release: Apache Sling Commons ClassLoader 1.3.8 (Feb 3rd, 2017)
-* New Releases: Apache Sling Resource Inventory 1.0.6, Apache Sling Installer Core 3.8.2 (Jan 31st, 2017)
-* New Releases: Apache Sling JSP 2.2.6, Apache Sling Auth Core 1.3.24 (Jan 30th, 2017)
-* New Releases: Apache Sling File System Resource Provider 1.2.2, Maven Sling Plugin 2.1.10, and Apache Sling Resource Resolver 1.5.12 (Jan 23th, 2017)
-* New Releases: Apache Sling Tenant 1.1.0, Apache Sling Scripting HTL Compiler 1.0.6, Apache Sling Scripting HTL Java Compiler 1.0.8, Apache Sling Scripting HTL Engine 1.0.30, Apache Sling HTL Maven Plugin 1.0.6 (Jan 17th, 2017)
-* New Release: Apache Sling JSP 2.2.4 (Jan 16th, 2017)
-* New Release: Apache Sling Resource Resolver 1.5.10 (Jan 13th, 2017)
-* New Releases: JUnit Core 1.0.23, JUnit Tests Teleporter 1.0.10, Testing Clients 1.0.1, Server Setup Tools 1.0.1, Testing Rules 1.0.1 (Jan 11th, 2017)
-* New Releases: Apache Sling Scripting HTL Compiler 1.0.4, Apache Sling Scripting HTL Java Compiler 1.0.6, Apache Sling Scripting HTL Engine 1.0.28, Apache Sling Scripting HTL Models Use Provider 1.0.6, Apache Sling Scripting HTL JS Use Provider 1.0.18, Apache Sling HTL Maven Plugin 1.0.4 (January 9th, 2017)
-* New Release: Apache Sling Testing Hamcrest 1.0.2 (January 7th, 2017)
-* New Release: Apache Sling Testing ResourceResolver Mock 1.1.16 (December 27th, 2016)
-* New Releases: Apache Sling Servlets Resolver 2.4.10, Apache Sling File System Classloader 1.0.4 and Apache Sling Installer Console 1.0.2 (December 24th, 2016)
-* New Releases: Apache Sling Resource Resolver 1.5.8, Apache Sling JCR Resource 2.9.2 and Apache Sling Slingshot Sample 0.8.0 (December 23rd, 2016)
-* New Releases: Apache Sling Mock 2.2.4, Sling Mock 1.9.4, JUnit Core 1.0.22, Sling Models API 1.3.2, Models Impl 1.3.8 and Apache Sling Service User Mapper 1.2.4 (December 22th, 2016)
-* New Releases: Apache Sling JCR Base 3.0.0 (December 20th, 2016)
-* New Releases: Apache Sling Dynamic Include 3.0.0 (December 20th, 2016)
-* New Releases: Apache Sling i18n 2.5.6, Apache Sling JCR RepoInit module 1.1.2 (December 19th, 2016)
-* New Releases: Apache Sling API 2.16.2 and Slingstart Maven Plugin 1.7.0 (December 18th, 2016)
-* New Releases: Apache Sling JCR Resource 2.9.0, Apache Sling Scripting JSP 2.2.2, Apache Sling Scripting Java 2.1.2, Apache Sling Provisioning Model 1.8.0, Apache Sling Testing JCR Mock 1.2.0, OSGi Mock 2.2.2, OSGi Mock 1.9.2, Sling Mock 2.2.2, Sling Mock 1.9.2, JUnit Core 1.0.20, Apache Sling Context-Aware Configuration API 1.1.0, Context-Aware Configuration SPI 1.2.0, Context-Aware Configuration Impl 1.2.0, Context-Aware Configuration bnd Plugin 1.0.2, Context-Aware Configuration Mock Plugin 1.0.0 (December 16th, 2016)
-* New Releases: Apache Sling Scripting API 2.1.12, Apache Sling Scripting Core 2.0.44 (December 15th, 2016)
-* New Release: Apache Sling JCR Installer 3.1.22 (December 13th, 2016)
-* New Release: Apache Sling Commons Metrics 1.2.0 (December 13th, 2016)
-* New Releases: Apache Sling OSGi Mock 2.2.0, OSGi Mock 1.9.0, Sling Mock 2.2.0, Sling Mock 1.9.0 (December 8th, 2016)
-* New Releases: Apache Sling API 2.16.0, Apache Sling Resource Resolver 1.5.6, Apache Sling Servlets Resolver 2.4.8, Apache Sling JCR Resource 2.8.4 (December 6th, 2016)
-* New Releases: Apache Sling Models bnd Plugin 1.0.0, Apache Sling Commons ClassLoader 1.3.6 (November 24th, 2016)
-* New Release: Apache Sling JCR Resource 2.8.2, Security 1.1.2, Models Implementation 1.3.4 and Models Jackson Exporter 1.0.4 (November 22th, 2016)
-* New Release: Apache Sling Resource Resolver 1.5.4, Apache Sling Discovery Base 1.1.6, Apache Sling Discovery Commons 1.0.18, Apache Sling Discovery Impl 1.2.10 and Discovery Oak 1.2.16 (November 21st, 2016)
-* New Releases: Apache Sling Auth Core 1.3.22 (November 15th, 2016)
-* New Releases: Apache Sling JCR Base 2.4.2 (November 14th, 2016)
-* New Releases: Apache Sling Provisioning Model 1.7.0 and Apache Sling Slingstart Maven Plugin 1.6.0 (November 13th, 2016)
-* New Releases: Apache Sling JCR Repoinit 1.1.0 and Apache Sling Repoinit Parser 1.1.0 (November 12th, 2016)
-* New Release: Apache Sling Slingstart Maven Plugin 1.5.0 (November 11th, 2016)
-* New Release: Apache Sling Installer Core 3.8.0, Apache Sling Context-Aware Configuration SPI 1.1.0 and Impl 1.1.0 (November 10th, 2016)
-* New Release: Apache Sling Resource Resolver 1.5.2, Apache Sling Provisioning Model 1.6.0, and Apache Sling HTL Maven Plugin 1.0.2 (November 8th, 2016)
-* New Release: Apache Sling Commons Mime 2.1.10 (November 7th, 2016)
-* New Release: Apache Sling Web Console Security Provider 1.2.0 (November 6th, 2016)
-* New Releases: Apache Sling Models API 1.3.0, Models Implementation 1.3.0 and Models Jackson Exporter 1.0.0 (November 3th, 2016)
-* New Releases: Apache Sling Launchpad Base 2.6.14, Apache Sling Provisioning Model 1.5.0, Apache Sling XSS Protection API 1.0.16 (October 31st, 2016)
-* New Release: Apache Sling Commons Scheduler 2.5.2 (October 27th, 2016)
-* New Releases: Apache Sling API 2.15.0, Apache Sling Resource Resolver 1.5.0, Apache Sling Installer Core 3.7.0 (October 25st, 2016)
-* New Release: Apache Sling Scripting HTL Engine 1.0.26, Apache Sling Commons Log 5.0.0, Log WebConsole 1.0.0, Apache Sling DataSource Provider 1.0.2 and Apache Sling Log Tracer 1.0.2 (October 24th, 2016)
-* New Release: Apache Sling Servlets Resolver 2.4.6 (October 22nd, 2016)
-* New Releases: Apache Sling Scripting JSP 2.2.0, Apache Sling Engine 2.6.6, Apache Sling Scripting Java 2.1.0, Apache Sling Scripting HTL JS Use Provider 1.0.16 (October 20th, 2016)
-* New Releases: Apache Sling Context-Aware Configuration API 1.0.0, SPI 1.0.0, Impl 1.0.0, bnd Plugin 1.0.0, Resource Builder 1.0.2, Testing Hamcrest 1.0.0 (October 18th, 2016)
-* New Releases: Apache Sling Scripting Core 2.0.40, Apache Sling Scripting HTL Java Compiler 1.0.4, Apache Sling Scripting HTL Engine 1.0.24 (October 17th, 2016)
-* New Release: Apache Sling Launchpad Base 2.6.12 (October 16th, 2016)
-* New Releases: Apache Sling Event 3.4.0, Apache Sling Distributed Eventing 1.1.0, and Apache Sling Rewriter 1.2.0 (October 15th, 2016)
-* New Release: Apache Sling Pipes 0.0.10 (October 14th, 2016)
-* New Releases: Apache Sling Scripting HTL Compiler 1.0.2, Apache Sling Scripting HTL Java Compiler 1.0.2, Apache Sling Scripting HTL Engine 1.0.22, Apache Sling Scripting HTL JS Use Provider 1.0.14, Apache Sling Scripting HTL Models Use Provider 1.0.4 (October 13th, 2016)
-* New Release: Apache Sling Testing Sling Mock 2.1.2 (October 10th, 2016)
-* New Release: Apache Sling i18n 2.5.4 (October 8th, 2016)
-* New Release: Apache Sling Oak Restrictions 1.0.0 (October 3rd, 2016)
-* New Releases: Apache Sling Discovery Commons 1.0.16 and Discovery Oak 1.2.14 (Sep 29th, 2016)
-* New Release: Apache Sling Testing Clients 1.0.0, Apache Sling Server Setup Tools 1.0.0, Apache Sling Testing Rules 1.0.0 (Sep 16th, 2016)
-* New Release: Apache Sling Auth Core 1.3.20, JUnit Core 1.0.18, JUnit Tests Teleporter 1.0.8, Testing Logging Mock 2.0.0, JCR Mock 1.1.16, OSGi Mock 1.8.0, OSGi Mock 2.1.0, Sling Mock 1.8.0, Sling Mock 2.1.0, Sling Mock Oak 2.0.2, Resource Builder 1.0.0, Servlet Helpers 1.1.0 (Sep 19th, 2016)
-* New Releases: Apache Sling Scripting HTL Compiler 1.0.0, Apache Sling Scripting HTL Java Compiler 1.0.0, Apache Sling Scripting HTL Engine 1.0.20, Apache Sling Scripting HTL JS Use Provider 1.0.12, Apache Sling Scripting HTL Models Use Provider 1.0.2, Apache Sling Scripting HTL REPL 1.0.4, Apache Sling HTL Maven Plugin 1.0.0 (Sep 8th, 2016)
-* New Release: Apache Sling Discovery Oak 1.2.10 (Sep 5th, 2016)
-* New Releases: Apache Sling RepoInit Parser 1.0.4, Apache Sling RepoInit JCR module 1.0.2, Apache Sling XSS Protection API 1.0.14 (August 29th, 2016)
-* New Releases: Apache Sling Auth Core 1.3.18 and Apache Sling Testing Tools 1.0.14 (August 29th, 2016)
-* New Releases: Apache Sling Engine 2.6.2, Apache Sling Commons Testing 2.1.0, Apache Sling API 2.14.2, Apache Sling Resource Resolver 1.4.18 (August 26th, 2016)
-* New Release: Apache Sling Servlets Get 2.1.18 (August 25th, 2016)
-* New Release: Apache Sling Engine 2.6.0, Apache Sling Feature Flags 1.2.0 (August 22nd, 2016)
-* New Releases: Apache Sling Background Servlets 1.0.8, Apache Sling XSS Protection API 1.0.12 (August 19th, 2016)
-* New Releases: Apache Sling I18n 2.5.2 and Apache Sling Hypermedia API client-side tools 1.0.0 (August 18th, 2016)
-* New Releases: Apache Sling Testing PaxExam 0.0.2, Apache Sling JCR Oak Server 1.1.0 (August 17th, 2016)
-* New Release: Apache Sling Security 1.1.0 (August 15th, 2016)
-* New Releases: Apache Sling i18n 2.5.0 and Apache Sling i18n 2.4.10 (August 8th, 2016)
-* New Releases: Apache Sling Engine 2.5.0, Apache Sling i18n 2.4.8, and Apache Sling Feature Flags 1.1.0 (August 5th, 2016)
-* New Release: Apache Sling Event Support 4.1.0 (August 1st, 2016)
-* New Releases: Apache Sling Resource Resolver 1.4.16, Apache Sling Launchpad Testing Services 2.0.10, Testing Services WAR 2.0.10, Apache Sling Integration Tests 1.0.2, Apache Sling API 2.14.0 (July 25th, 2016)
-* New Release: Apache Sling Commons Scheduler 2.5.0 (July 24th, 2016)
-* New Release: Apache Sling Resource Resolver 1.4.14 (July 21st, 2016)
-* New Releases: Apache Sling Discovery Base 1.1.4, Apache Sling Discovery Impl 1.2.8, Apache Sling Discovery Oak 1.2.8 (July 17th, 2016)
-* New Releases: Apache Sling Testing Sling Mock 1.7.0, Sling Mock 2.0.0, Sling Mock Oak 2.0.0 (July 15th, 2016)
-* New Releases: Apache Sling Commons Testing 2.0.26, Apache Sling Scripting Core 2.0.38, Apache Sling Servlets Resolver 2.4.4 (July 13th, 2016)
-* New Releases: Apache Sling Repoinit Parser 1.0.2, Repoinit JCR 1.0.0 (July 11th, 2016)
-* New Release: Apache Sling API 2.12.0 (July 9th, 2016)
-* New Release: Apache Sling Scripting Thymeleaf 1.0.0 (July 4th, 2016)
-* New Release: Apache Sling Auth Core 1.3.16 (June 29th, 2016)
-* New Releases: Apache Sling Adapter Manager 2.1.8 (June 28th, 2016)
-* New Releases: Apache Sling Repository API Bundle 2.4.0, Apache Sling JCR Base Bundle 2.4.0 (June 27th, 2016)
-* New Release: Apache Sling Rewriter 1.1.4 (June 26th, 2016)
-* New Releases: Apache Sling JCR Resource 2.8.0 and Apache Sling Scripting JavaScript 2.0.30 (June 22nd, 2016)
-* New Releases: Apache Sling Testing JCR Mock 1.1.14, OSGi Mock 2.0.4, ResourceResolver Mock 1.1.14 (June 13th, 2016)
-* New Releases: Apache Sling Provisioning Model 1.4.4, and Slingstart Maven Plugin 1.4.4 (June 10th, 2016)
-* New Release: Apache Sling Servlets Post 2.3.12 (June 1st, 2016)
-* New Release: Apache Sling JSON Library 2.0.16 (May 27th, 2016)
-* New Release: Apache Sling Discovery API 1.0.4 (April 29th, 2016)
-* New Release: Apache Sling Log Tracer version 1.0.0, Apache Sling Resource Resolver 1.4.12 (April 25th, 2016)
-* New Release: Apache Sling Scripting JSP-Taglib version 2.2.6 (April 21st, 2016)
-* New Release: Apache Sling Auth Core 1.3.14 (April 12th, 2016)
-* New Release: Apache Sling Servlets Post (April 10th, 2016)
-* New Release: Apache Sling Resource Resolver (April 7th, 2016)
-* New Release: Apache Sling Event 4.0.2 (April 4th, 2016)
-* New Release: Apache Sling Discovery Commons 1.0.12 (March 29th, 2016)
-* New Release: Apache Sling Scripting Sightly Engine 1.0.18 (March 18th, 2016)
-* New Release: Apache Maven Sling Plugin 2.1.8 (March 16th, 2016)
-* New Release: [Apache Sling IDE Tooling for Eclipse 1.1.0](/news/sling-ide-tooling-11-released.html) (March 14th, 2016)
-* New Releases: Apache Sling Resource Resolver 1.4.8, Apache Sling JCR Resource 2.7.4, and Apache Sling Installer Core 3.6.8 (March 11th, 2016)
-* New Releases: Apache Sling Health Check Core 1.2.4, Apache Sling Health Checks Annotations 1.0.4, Apache Sling JCR Davex 1.3.2, and Apache Sling JCR Webdav 2.3.4 (March 8th, 2016)
-* New Release: Apache Sling Scripting Sightly Engine 1.0.16 (March 5th, 2016)
-* New Release: Apache Sling Tooling Support Source 1.0.0 (March 3rd, 2016)
-* New Releases: Apache Sling Background Servlets Engine 1.0.6, Apache Sling Background Servlets Integration Test 1.0.0 (March 2nd, 2016)
-* New Releases: Apache Sling NoSQL Generic Resource Provider 1.1.0, Couchbase Client 1.0.2, Couchbase Resource Provider 1.1.0, MongoDB Resource Provider 1.1.0 (February 27th, 2016)
-* New Release: Apache Sling Resource Resolver 1.4.4, Apache Sling Scripting Sightly Engine 1.0.14 (February 26th, 2016)
-* New Release: Apache Sling JCR Base 2.3.2 (February 23rd, 2016)
-* New Release: Apache Sling Internationalization Support (I18N) 2.4.6 (February 22nd, 2016)
-* New Releases: Apache Sling Resource Resolver 1.4.2, Apache Sling JCR Resource 2.7.2, and Apache Sling Servlets Resolver 2.4.2 (February 19th, 2016)
-* New Release: Apache Sling JCR Installer 3.1.18 (February 15th, 2016)
-* New Release: Apache Sling Resource Merger 1.3.0 (February 14th, 2016)
-* New Release: Apache Sling Scripting Core 2.0.36 (February 12th, 2016)
-* New Release: Apache Sling Slingstart Maven Plugin 1.4.2 (February 11th, 2016)
-* New Releases: Apache Sling API 2.11.0, Apache Sling Resource Resolver 1.4.0, Apache Sling JCR Resource 2.7.0, Apache Sling Servlets Resolver 2.4.0, Apache Sling Testing OSGi Mock 1.7.2, OSGi Mock 2.0.2, JCR Mock 1.1.12, Sling Mock 1.6.2, ResourceResolver Mock 1.1.12, Servlet Helpers 1.0.0 (February 8th, 2016)
-* New Release: Apache Sling Discovery Oak 1.2.6 (February 8th, 2016)
-* New Release: Apache Sling HApi 1.0.0 (February 5th, 2016)
-* New Releases: Apache Sling XSS Protection API 1.0.8, Apache Sling Scripting Sightly Engine 1.0.12 (February 2nd, 2016)
-* New Releases: Apache Sling Discovery Commons 1.0.10, Apache Sling Discovery Oak 1.2.4 and Apache Sling Testing Tools 1.0.12 (February 1st, 2016)
-* New Release: Apache Sling Thread Support 3.2.6 (January 25th, 2016)
-* New Release: Apache Sling Models Impl 1.2.6 (January 23st, 2016)
-* New Release: Apache Sling Testing Utilities 2.0.24 (January 21st, 2016)
-* New Releases: Apache Sling Commons Metrics 1.0.0 (January 15th, 2016)
-* New Releases: Apache Sling Scripting Sightly Engine 1.0.10, Apache Sling Scripting Groovy 1.0.2 (January 12th, 2016)
-* New Releases: Apache Sling Slingstart Maven Plugin 1.4.0, and Apache Sling Commons OSGi 2.4.0, Apache Sling Engine Implementation 2.4.6 (January 8th, 2016)
-* New Releases: Apache Sling Scripting JavaScript 2.0.28 (January 8th, 2016)
-* New Releases: Apache Sling JUnit Tests Teleporter 1.0.6, Apache Sling JUnit Core 1.0.16 (January 3rd, 2016)
-* New Releases: Apache Sling Settings 1.3.8, Apache Sling Launchpad Base 2.6.10, Apache Sling Scripting JSP 2.1.8, Apache Sling Commons Threads 3.2.4, Apache Sling Discovery Standalone 1.0.2, and Apache Sling Parent POM 26 (January 3rd, 2016)
-* New Release: Apache Sling Provisioning Model 1.4.2 (December 28th, 2015)
-* New Release: Apache Sling Commons Scheduler 2.4.14, Apache Sling Servlets GET 2.1.14 (December 21st, 2015)
-* New Release: Apache Sling Scripting Java 2.0.14 (December 20th, 2015)
-* New Releases: Apache Sling Models Impl 1.2.4, Sling Testing OSGi Mock 2.0.0, Apache Sling Commons Scheduler 2.4.12 (December 14th, 2015)
-* New Release: Apache Sling Launchpad Base 2.6.8 (December 11th, 2015)
-* New Release: Apache Sling Event 4.0.0 (December 1st, 2015)
-* New Releases: Apache Sling Discovery Commons 1.0.6, Apache Sling Discovery Base 1.1.2, Apache Sling Discovery Oak 1.2.0, and Apache Sling Discovery Impl 1.2.6 (November 30th, 2015)
-* New Releases: Apache Sling Thread Support 3.2.2 (November 29th, 2015)
-* New Releases: Apache Sling Background Servlets Engine 1.0.2, Apache Sling JUnit Core 1.0.14, Apache Sling JUnit Tests Teleporter 1.0.4 (November 23rd, 2015)
-* New Release: Apache Sling Security 1.0.18 (November 20th, 2015)
-* New Releases: Apache Sling Discovery Commons 1.0.4, Apache Sling Discovery Base 1.1.0, Apache Sling Discovery Oak 1.1.0, Apache Sling Discovery Impl 1.2.2 (November 16th, 2015)
-* New Releases: Apache Sling Commons Testing 2.0.22, Commons JSON 2.0.16, Maven Sling Plugin 2.1.6 (November 12th, 2015)
-* New Release: Apache Sling Testing OSGi Mock 1.7.0 (November 9th, 2015)
-* New Releases: Apache Sling Discovery Commons 1.0.2, Apache Sling Discovery Base 1.0.2, Apache Sling Discovery Oak 1.0.2, Apache Sling Discovery Impl 1.2.0 (November 5th, 2015)
-* New Release: Apache Sling IDE Tooling 1.0.10 (November 9th, 2015)
-* New Releases: Apache Sling Discovery Commons 1.0.0, Apache Sling Discovery Base 1.0.0, Apache Sling Discovery Oak 1.0.0 (November 2nd, 2015)
-* New Releases: Apache Sling Rewriter 1.1.2 (October 27th, 2015)
-* New Releases: Apache Sling Launchpad Base 2.6.6, Apache Sling Event 3.7.6, Apache Sling Provisioning Model 1.4.0, and Apache Sling Maven Launchpad Plugin 2.3.4 (October 26th, 2015)
-* New Releases: Apache Sling Archetype Parent version 4, Apache Sling Bundle Archetype version 1.0.4, Apache Sling JCRInstall Bundle Archetype 1.0.4, Apache Sling Initial Content Archetype 1.0.4, Apache Sling Servlet Archetype 1.0.4, Apache Sling Slingstart Archetype 1.0.0 (October 19th, 2015)
-* New Release: Apache Sling Auth Core 1.3.12 (October 18th, 2015)
-* New Release: [Apache Sling 8](/news/sling-launchpad-8-released.html) (October 16th, 2015)
-* New Release: Apache Sling Maven Plugin for Supporting Bundle Development 2.1.2 (October 15th, 2015)
-* New Release: Apache Sling Auth Forms 1.0.8 (October 13, 2015)
-* New Releases: Apache Sling Scripting Sightly Engine 1.0.6, Apache Sling Scripting Sightly Models Use Provider 1.0.0, Apache Sling Scripting Sightly REPL 1.0.2, Apache Sling Scripting JavaScript 2.0.26, Apache Sling XSS Protection API 1.0.6 (October 12th, 2015)
-* New Releases: Apache Sling Oak Repository Server 1.0.0, Apache Sling Adapter Manager Implementation 2.1.6, Apache Sling Jackrabbit UserManager Support 2.2.4, Apache Sling Simple WebDAV Access to repositories 2.3.2, Apache Sling OSGi LogService Implementation 1.0.6, Apache Sling Engine Implementation 2.4.4, Apache Sling JSON Library 2.0.12 ( October 12th, 2015)
-* New Releases: Apache Sling Testing OSGi Mock 1.6.0, Sling Mock 1.6.0, Sling Mock Jackrabbit 1.0.0, Sling Mock Oak 1.0.0 (October 9th, 2015)
-* New Release: Apache Sling Eclipse IDE 1.0.8 (October 8th, 2015)
-* New Release: Apache Sling Servlets Resolver 2.3.8, and Apache Sling Parent 25 (October 5th, 2015)
-* New Release: Apache Sling Discovery Impl 1.1.8, and Apache Sling Distributed Event Admin 1.0.4 (September 30th, 2015)
-* New Releases: Apache Sling JUnit Core 1.0.12, Apache Sling JUnit Tests Teleporter 1.0.2 (September 28th, 2015)
-* New Releases: Apache Sling NoSQL Generic Resource Provider 1.0.0, NoSQL Couchbase Client 1.0.0, NoSQL Couchbase Resource Provider 1.0.0, NoSQL MongoDB Resource Provider 1.0.0 (September 21th, 2015)
-* New Releases: Apache Sling Testing ResourceResolver Mock 1.1.10, Apache Sling Rewriter 1.1.0, Apache Sling Models API 1.2.2, Apache Sling Models Impl 1.2.2 (September 15th, 2015)
-* New Releases: Apache Sling Testing Sling Mock 1.5.0, JCR Mock 1.1.10 (September 10th, 2015)
-* New Releases: Apache Sling Scripting Sightly JS Use Provider 1.0.10, Apache Sling Scripting Sightly Engine 1.0.4, Apache Sling Scripting JavaScript 2.0.24 (September 7th, 2015)
-* New Release: Apache Sling Slingstart Maven Plugin 1.3.6 (September 7th, 2015)
-* New Release: Apache Sling Launchpad Base 5.2.0-2.6.4 (September 6th, 2015)
-* New Release: Apache Sling Security 1.0.16 (September 4th, 2015)
-* New Releases: Apache Sling JCR Resource 2.5.6, and Apache Sling Slingstart Maven Plugin 1.3.4, Apache Sling Security 1.0.14 (August 31st, 2015)
-* New Release: Apache Sling Security 1.0.12 (August 25th, 2015)
-* New Releases: Apache Sling Testing OSGi Mock 1.5.0, ResourceResolver Mock 1.1.8 (August 24th, 2015)
-* New Release: Apache Sling Web Console Security Provider 1.1.6 (August 21st, 2015)
-* New Release: Apache Sling Slingstart Maven Plugin 1.3.2 (August 20th, 2015)
-* New Releases: Apache Sling JCR API 2.3.0, Apache Sling JCR Base 2.3.0, Apache Sling JCR Jackrabbit Server 2.3.0, Apache Sling JCR Davex 1.3.0 and Apache Sling JCR Webdav 2.3.0 (August 17th, 2015)
-* New Release: Apache Sling Commons Scheduler 2.4.10 (August 14th, 2015)
-* New Releases: Apache Sling i18n 2.4.4, Apache Sling Scripting Core 2.0.34, Apache Sling Scripting JavaScript 2.0.22, Apache Sling Scripting Sightly JS Use Provider 1.0.8 (August 13th, 2015)
-* New Releases: Apache Sling Commons Log 4.0.6 (August 11th, 2015)
-* New Releases: Apache Sling Slingstart Maven Plugin 1.3.0, and Apache Sling Provisioning Model 1.3.0 (August 7th, 2015)
-* New Release: Apache Sling XSS Protection Bundle 1.0.4 (August 3rd, 2015)
-* New Release: Apache Sling Scripting Core 2.0.32 (July 26th, 2015)
-* New Releases: Apache Sling Event 3.7.4 and Apache Sling Distributed Event Admin 1.0.2 (July 24th, 2015)
-* New Releases: Apache Sling Scripting API 2.1.8, Apache Sling Scripting Core 2.0.30, Apache Sling Scripting JavaScript 2.0.20,
-Apache Sling Scripting Sightly JS Use Provider 1.0.6, Apache Sling Resource Merger 1.2.10 (July 21st, 2015)
-* New Release: Apache Sling JCR Resource 2.5.4 (July 17th, 2015)
-* New Release: Apache Sling Servlets GET 2.1.12 (July 17th, 2015)
-* New Release: Apache Sling Event 3.7.2 (July 13th, 2015)
-* New Release: Apache Sling Authentication Service 1.3.10 (July 13th, 2015)
-* New Release: Apache Sling Scripting Thymeleaf 0.0.6 (July 10th, 2015)
-* New Release: Apache Sling Content Detection Support 1.0.2 (July 9th, 2015)
-* New Releases: Apache Sling Parent 24, Apache Sling Authentication Service 1.3.8 (July 6th, 2015)
-* New Release: Apache Sling Scripting JavaScript Support 2.0.18 (July 2nd, 2015)
-* New Release: Apache Sling Feature Flags 1.0.2 (July 1st, 2015)
-* New Release: Apache Sling Event 3.7.0 (June 30, 2015)
-* New Releases: Apache Sling Models API 1.2.0, Models Impl 1.2.0, Testing Sling Mock 1.4.0, OSGi Mock 1.4.0, JCR Mock 1.1.8 (June 27th, 2015)
-* New Release: Apache Sling JCR Resource Resolver 2.5.2 (June 26th, 2015)
-* New Release: Apache Sling Parent 23 (June 25th, 2015)
-* New Release: Apache Sling Log Tracer 1.0.2 (June 22th, 2015)
-* New Release: Apache Sling Commons FileSystem ClassLoader 1.0.2 (June 19th, 2015)
-* New Release: Apache Sling Default POST Servlets 2.3.8 (June 15th, 2015)
-* New Releases: Apache Sling Provisioning Model 1.2.0, Apache Sling Installer Core 3.6.6, Apache Sling Commons Scheduler 2.4.8, and Apache Sling Slingstart Maven Plugin 1.2.0 (June 13th, 2015)
-* New Release: Apache Sling Background Servlets Engine 1.0.0 (June 2nd, 2015)
-* New Releases: Apache Sling Testing Sling Mock 1.3.0, OSGi Mock 1.3.0, JCR Mock 1.1.6, ResourceResolver Mock 1.1.6, Logging Mock 1.0.0, Commons OSGi 2.3.0 (May 26th, 2015)
-* New Release: Apache Sling Installer Core 3.6.4 (May 2nd, 2015)
-* New Releases: Apache Sling Health Check Core 1.2.2 and Apache Sling Launchpad Base 5.0.0-2.6.0 (April 30th, 2015)
-* New Release: Apache Sling Discovery Impl 1.1.2 (April 28th, 2015)
-* New Release: Apache Sling Testing Tools 1.0.10 (April 24th, 2015)
-* New Releases Apache Sling i18n 2.4.2, and Apache Sling Slingstart Maven Plugin 1.1.0 (April 23rd, 2015)
-* New Release: Apache Sling Scripting JavaScript Support 2.0.16 (April 20th, 2015)
-* New Releases: Apache Sling Engine Implementation 2.4.2, Apache Sling File Installer 1.1.0 and Apache Sling Resource Inventory 1.0.4 (April 20th, 2015)
-* New Releases: Apache Sling Scripting Sightly JS Provider 1.0.4, Apache Sling Scripting Sightly Testing Content 1.0.4, Apache Sling Scripting Sightly Testing 1.0.4 (April 16th, 2015)
-* New Releases: Apache Sling JCR Installer 3.1.16 and Apache Sling Commons Testing 2.0.18 (April 13th, 2015)
-* New Releases: Apache Sling Security 1.0.10 (April 8th, 2015)
-* New Releases: Apache Sling Scripting Sightly 1.0.2, Apache Sling Scripting Sightly Testing Content 1.0.2, Apache Sling Scripting Sightly Testing 1.0.2 (April 7th, 2015)
-* New Releases: Apache Sling Event 3.6.0, Apache Sling Commons Log 4.0.2, and Apache Sling Commons Log Service 1.0.4 (April 7th, 2015)
-* New Release: Apache Sling Performance Test Utilities 1.0.2 (April 2nd, 2015)
-* New Releases: Apache Sling Scripting Sightly 1.0.0, Apache Sling Scripting Sightly JavaScript Use Provider 1.0.0, Apache Sling Scripting Sightly REPL 1.0.0, Apache Sling Scripting Sightly Testing Content 1.0.0 (March 30th, 2015)
-* New Release: Apache Sling XSS Protection Bundle 1.0.2 (March 30th, 2015)
-* New Release: Apache Sling Resource Resolver 1.2.4 (March 24th, 2015)
-* New Release: Apache Sling XSS Protection Bundle 1.0.0 (March 20th, 2015)
-* New Releases: Apache Sling JCR Installer 3.1.14, Apache Sling Resource Resolver 1.2.2, and Apache Sling Service User Mapper 1.2.0 (March 16th, 2015)
-* New Releases: Apache Sling Launchpad Base 4.6.1-2.5.8, Apache Sling Event 3.5.4, Apache Sling Settings 1.3.6, Apache Sling Resource Merger 1.2.8, Apache Sling Slingstart Maven Plugin 1.0.4, and Apache Sling Provisioning Model 1.1.0 (March 12th, 2015)
-* New Release: Apache Sling Query 3.0.0 (March 11th, 2015)
-* New Releases: Apache Sling JCR Resource 2.5.0, and Apache Sling Resource Resolver 1.2.0 (March 5th, 2015)
-* New Release: Apache Sling Commons Scheduler 2.4.6 (March 4th, 2015)
-* New Releases: Apache Sling IDE Tooling 1.0.6, Apache Sling Service User Mapper 1.1.0, Apache Sling Health Check Core 1.2.0, and Apache Sling Health Check Web Console 1.1.2 (March 2nd, 2015)
-* New Release: Apache Sling URL Rewriter 0.0.2 (February 27th, 2015)
-* New Release: Apache Sling Security 1.0.8, Testing Sling Mock 1.2.0, OSGi Mock 1.2.0, JCR Mock 1.1.4, ResourceResolver Mock 1.1.4 (February 26th, 2015)
-* New Release: Apache Sling API 2.9.0 (February 24th, 2015)
-* New Release: Apache Sling Tooling Support Install 1.0.2 (February 23, 2015)
-* New Release: Apache Sling Engine Implementation 2.4.0 (February 19th, 2015)
-* New Releases: Apache Sling Auth Core 1.3.6, Apache Sling Resource Resolver 1.1.14, Apache Sling Eventing 3.5.2, Apache Sling Resource Merger 1.2.6, and Apache Sling Installer Factory Configuration 1.1.2 (February 16th, 2015)
-* New Release: Apache Sling Resource Resolver 1.1.12 (February 2nd, 2015)
-* New Releases: Apache Sling Testing JCR Mock 1.1.2, ResourceResolver Mock 1.1.2, Sling Mock 1.1.2, Sling Mock Jackrabbit 0.1.2 (January 28th, 2015)
-* New Releases: Apache Sling JCR Resource 2.4.4, Apache Sling Launchpad Base 4.6.0-2.5.6 (January 26th, 2015)
-* New Release: Apache Sling JCR Resource 2.4.2 (January 23rd, 2015)
-* New Releases: Apache Sling Resource Resolver 1.1.10 , Apache Sling DataSource 1.0.0, and Apache Sling Launchpad Base 4.6.0-2.5.4 (January 19th, 2015)
-* New Release: Apache Sling Commons JSON 2.0.10 (January 17th, 2015)
-* New Releases: Apache Sling Installer Core 3.6.2, Apache Sling i18n 2.3.2 (January 16th, 2015)
-* New Release: Apache Sling JCR Resource Security 1.0.2 (January 13th, 2015)
-* New Releases: Apache Sling Installer Core 3.6.0, Apache Sling Installer Factory Configuration 1.1.0, and Apache Sling Launchpad Installer 1.2.2 (January 12th)
-* New Release: Apache Sling Eventing 3.5.0 (January 10th, 2015)
-* New Releases: Apache Sling JCR Resource Security 1.0.0, and Apache Sling Installer Factory Subsystems 1.0.0 (January 9th, 2015)
-* New Releases: Release Apache Sling JUnit Core 1.0.10, JUnit Scriptable Tests Provider 1.0.10, JUnit Remote Tests Runners 1.0.10 (December 15th, 2014)
-* New Releases: Apache Sling Testing Sling Mock 1.1.0, OSGi Mock 1.1.0, JCR Mock 1.1.0, ResourceResolver Mock 1.1.0, Adapter Manager 2.1.4 (December 15th, 2014)
-* New Releases: Apache Sling Auth Core 1.3.4 (December 2nd, 2014)
-* New Release: Apache Sling Resource Merger 1.2.0 (November 29th, 2014)
-* New Release: Apache Sling Resource Resolver 1.1.8 (November 27th, 2014)
-* New Release: Apache Sling Servlets Resolver 2.3.6, and Apache Sling Engine 2.3.10 (November 18th, 2014)
-* New Release: Apache Sling Servlets Resolver 2.3.4 (November 14th, 2014)
-* New Release: Apache Sling Eventing 3.4.4 (November 7th, 2014)
-* New Release: Apache Sling Scripting JSP 2.1.6 (November 6th, 2014)
-* New Release: Apache Sling Slingstart Maven Plugin 1.0.2 (November 5th, 2014)
-* New Release: Apache Sling Event 3.4.2 (November 1st, 2014)
-* New Releases: Apache Sling Engine 2.3.8, Apache Sling Provisioning Model 1.0.0, and Apache Slingstart Maven Plugin 1.0.0 (October 27th, 2014)
-* New Release: Apache Sling JCR Resource Resolver 2.3.12 (October 26th, 2014)
-* New Releases: Apache Sling Eventing 3.4.0 and Apache Sling Distributed Event Admin 1.0.0 (October 24th, 2014)
-* New Release: Apache Sling JCR Resource Resolver 2.3.10 (October 22nd, 2014)
-* New Releases: Apache Sling Auth Core 1.3.2, Resource Resolver Mock 1.0.0, JCR Mock 1.0.0, OSGi Mock 1.0.0, Sling Mock 1.0.0, Sling Mock Jackrabbit 0.1.0 (October 21st, 2014)
-* New Release: Apache Sling IDE Tooling 1.0.4 ( October 18th, 2014)
-* New Releases: Apache Sling Settings 1.3.4, Apache Sling Discovery API 1.0.2, and Apache Sling Discovery Impl 1.0.12 (October 10th, 2014)
-* New Release: Apache Sling Resource Resolver 1.1.6 (October 4th, 2014)
-* New Release: Apache Sling Superimposing Resource Provider 0.2.0, Apache Sling 7 (October 3th, 2014)
-* New Release: Apache Sling Scripting Java 2.0.12 (September 30th, 2014)
-* New Release: Apache Sling Resource Resolver Mock 0.3.0 (September 29th, 2014)
-* New Release: Apache Sling Resource Resolver 1.1.4 (September 26, 2014)
-* New Releases: Apache Sling JSP Taglib 2.2.4 (September 25, 2014)
-* New Releases: Apache Sling DavEx Access to repositories 1.2.2, Apache Sling Adapter Manager Implementation 2.1.2, Apache Sling Scripting Core implementation 2.0.28 (September 22, 2014)
-* New Releases: Apache Sling JCR ContentLoader 2.1.0, and Apache Sling Web Console Security Provider 1.1.4 (September 21st, 2014)
-* New Releases: Apache Sling Resource Access Security 1.0.0, and Apache Sling Auth Core 1.3.0 (September 20th, 2014)
-* New Releases: Apache Sling Engine 2.3.6, Apache Sling JCR ClassLoader 3.2.2, Apache Sling JCR Jackrabbit Access Manager 2.1.2, Apache Sling JCR Jackrabbit Server 2.2.0, Apache Sling JCR Jackrabbit User Manager 2.2.2, Apache Sling JCR Registration 1.0.2, Apache Sling JCR Web Console 1.0.2 (September 19th, 2014)
-* New Release: Apache Sling Scripting Thymeleaf 0.0.4 (September 17th, 2014)
-* New Release: Apache Sling Resource Resolver 1.1.2 (September 16th, 2014)
-* New Release: Apache Sling Maven Launchpad Plugin 2.3.2 (September 15th, 2014)
-* New Releases: Apache Sling Filesystem Resource Provider 1.1.4, Apache Sling Launchpad Content 2.0.8, Apache Sling JSP Tag Library 2.2.2, Apache Sling Scripting Groovy Support 1.0.0 (September 12th, 2014)
-* New Release: Apache Sling Auth Core 1.2.0 (September 8th, 2014)
-* New Releases: Apache Sling Models API 1.1.0 and Apache Sling Models Impl 1.1.0 (September 5th, 2014)
-* New Releases: Apache Sling Crankstart Launcher (initial release), Apache Sling Health Check Annotations 1.0.2, Apache Sling Health Check Core 1.1.2, Apache Sling Health Check JUnit Bridge 1.0.2, Apache Sling Health Check Samples 1.0.6 (September 5th, 2014)
-* New Releases: Apache Sling Default GET Servlets 2.1.10, Apache Sling Explorer 1.0.4 (September 1st, 2014)
-* New Releases: Apache Sling API 2.8.0, Apache Sling JCR Resource 2.3.8, Apache Sling i18n 2.2.10, Apache Sling Installer Core 3.5.4, Apache Sling JCR Installer 3.1.8, and Apache Sling File Installer 1.0.4 (August 31st, 2014)
-* New Releases: Apache Sling JSON Library 2.0.8, and Apache Sling Default POST Servlets 2.3.6 (August 28th, 2014)
-* New Releases: Apache Sling Eventing 3.3.14, Apache Sling Commons Mime 2.1.8, and Apache Sling Commons Scheduler 2.4.4 (August 25th, 2014)
-* New Releases: Apache Sling Commons Mime 2.1.6, and Apache Sling Commons OSGi 2.2.2 (August 19th, 2014)
-* New Release: Apache Sling Tenant 1.0.2 (August 18th, 2014)
-* New Release: Apache Sling Query 2.0.0 (August 11th, 2014)
-* New Releases: Apache Sling Auth Core 1.1.8, Apache Sling Auth Selector 1.0.6, Apache Sling Form Based Authentication 1.0.6, and Apache Sling OpenID Authentication 1.0.4 (August 11th, 2014)
-* New Releases: Apache Sling Eventing 3.3.12 (August 8st, 2014)
-* New Releases: Apache Sling Parent 20 (August 1st, 2014)
-* New Releases: Apache Sling Discovery Impl 1.0.10 (July 29th, 2014)
-* New Releases: Apache Sling Engine 2.3.4 and Apache Sling Launchpad Base 4.4.1-2.5.2 (July 26th, 2014)
-* New Release: Apache Sling Testing Tools 1.0.8 (July 22nd, 2014)
-* New Release: Apache Sling Compat Servlets 1.0.2 (July 14th, 2014)
-* New Release: Apache Sling Service User Mapper 1.0.4 (July 14th, 2014)
-* New Releases: Apache Sling Settings 1.3.2, Apache Sling Scripting JSP 2.1.4, and Apache Sling Scripting Java 2.0.10 (July 13th, 2014)
-* New Releases: Apache Sling Authentication XING API 0.0.2, Apache Sling Authentication XING Login 0.0.2, Apache Sling Authentication XING OAuth 0.0.2 (July 11th, 2014)
-* New Release: Apache Sling Scripting Thymeleaf 0.0.2 (July 11th, 2014)
-* New Releases: Apache Sling Models API 1.0.2 and Apache Sling Models Impl 1.0.6 (July 2nd, 2014)
-* New Releases: Apache Sling Installer Core 3.5.2, and Apache Sling Installer Configuration Factory 1.0.14 (July 2nd, 2014)
-* New Release: Apache Sling Eclipse IDE 1.0.0 (July 1st, 2014)
-* New Release: Apache Sling Scripting JavaScript Support 2.0.14 (June 23rd, 2014)
-* New Releases: Apache Sling SLF4J MDC Filter 1.0.0 and Apache Sling Classloader Leak Detector 1.0.0 (June 9th, 2014)
-* New Release: Apache Sling Bundle JCR Install Archetype 1.0.2 (June 4th, 2014)
-* New Release: Apache Sling Tooling Support Install 1.0.0 (June 4th, 2014)
-* New Release: Apache Sling Bundle Archetype 1.0.2 (June 4th, 2014)
-* New Release: Apache Sling Servlet Archetype 1.0.2 (June 4th, 2014)
-* New Release: Apache Sling Service User Mapper 1.0.2 (June 2nd, 2014)
-* New Release: Apache Sling JCR ContentLoader 2.1.8 (May 23th, 2014)
-* New Releases: Apache Sling Commons Compiler 2.2.0, and Apache Sling Scripting JSP 2.1.0 (May 20th, 2014)
-* New Release: Apache Sling Archetype Parent 1 (May 14th, 2014)
-* New Release: Apache Sling Models Impl 1.0.4 (May 7th, 2014)
-* New Releases: Apache Sling Discovery Impl 1.0.8, Apache Sling Resource Inventory 1.0.2 and Apache Sling Eventing 3.3.10 (April 30th, 2014)
-* New Release: Apache Sling Commons ClassLoader 1.3.2 (April 17th, 2014)
-* New Releases: Apache Sling Resource Resolver 1.1.0, Apache Sling Featureflags 1.0.0, Apache Sling Resource-Based Discovery Service (discovery.impl) 1.0.6 (April 4th, 2014)
-* New Releases: Apache Sling Servlets Resolver 2.3.2, Apache Sling Servlets Get 2.1.8, Apache Sling Installer Configuration Factory 1.0.12, and Apache Sling Parent POM 19 (March 31st, 2014)
-* New Releases: Apache Sling API 2.7.0, Apache Sling JCR Resource 2.3.6, Apache Sling JMX Resource Provider 1.0.2, and Apache Sling Resource Merger 1.1.2 (March 24th 2014)
-* New Release: Apache Sling Model Implementation 1.0.2 (March 18th 2014)
-* New Release: Apache Sling JCR Resource 2.3.4 (March 17th, 2014)
-* New Release: Apache Sling Engine 2.3.2 (March 16th, 2014)
-* New Releases: Apache Sling i18n 2.2.8, Apache Sling JCR Resource 2.3.2, Apache Sling Discovery Impl 1.0.4, Apache Sling JCR Webdav 2.2.2, Apache Sling Resource Collection 1.0.0, Apache Sling Resource Inventory 1.0.0, Apache Sling JMX Provider 1.0.0, and Apache Sling Resource Merger 1.1.0 (March 8th, 2014)
-* New Releases: Apache Sling Commons Log 4.0.0, Apache Sling Security 1.0.0, Apache Sling JCR Registration 1.0.0, Apache Sling Bundle Resource 2.2.20, Apache Sling JCR Base 2.2.2, Apache Sling Eventing 3.3.6, Apache Sling Scripting API 2.1.6, Apache Sling Scripting Core 2.0.26, Apache Sling Servlets Get 2.1.6, and Apache Sling Servlets Post 2.3.4 (March 7th, 2014)
-* New Release: Apache Sling Maven Launchpad Plugin 2.3.0 (March 6th, 2014)
-* New Releases: Apache Sling API 2.6.0, and Apache Sling Engine 2.3.0 (March 3rd, 2014)
-* New Releases: Apache Sling Servlets Resolver 2.3.0, and Apache Sling Resource Merger 1.0.0 (February 24th, 2014)
-* New Releases: Apache Sling JCR API 2.2.0, Apache Sling JCR Base 2.2.0, and Apache Sling JCR Resource 2.3.0 (February 17th, 2014)
-* New Releases: Apache Sling Service User Mapper 1.0.0, and Apache Sling Resource Resolver Mock 0.2.0 (February 6th, 2014)
-* New Releases: Apache Sling Health Check Core 1.1.0, Apache Sling Health Check Webconsole 1.1.0, and Apache Sling Auth Core 1.1.6 (January 31th, 2014)
-* New Release: Apache Sling Pax Exam Utilities 1.0.2 (January 28th, 2014)
-* New Releases: Apache Sling API 2.5.0, and Apache Sling Eventing 3.3.4 (January 24th, 2014)
-* New Releases: Apache Sling Installer Core 3.5.0, and Apache Sling Eventing 3.3.2 (January 19th, 2014)
-* New Release: Apache Sling Web Console Security Provider 1.1.2 (December 17th, 2013)
-* New Release: Apache Sling Maven JSPC Plugin 2.0.8 (December 14th, 2013)
-* New Release: Apache Sling Resource-Based Discovery Service 1.0.2 (December 3rd, 2013)
-* New Release: Apache Sling Testing Utilities 2.0.16 (November 27th, 2013)
-* New Release: Apache Sling Web Console Security Provider 1.1.0 (October 28th, 2013)
-* New Release: Apache Sling Event 3.3.0, Apache Sling Commons Scheduler 2.4.2, Apache Sling Commons Threads 3.2.0, Apache Sling Health Check Core 1.0.6, Apache Sling Health Check JMX 1.0.6, Apache Sling JMX Resource Provider 0.6.0 (October 24th, 2013)
-* New Release: Apache Sling Engine 2.2.10 (October 12th, 2013)
-* New Release: Apache Sling Auth Core 1.1.4, Apache Sling Commons Scheduler 2.4.0, Apache Sling Resource Inventory 0.5.0, Apache Sling JMX Resource Provider 0.5.0 (October 7th, 2013)
-* New Releases: Apache Sling Health Check Tools: org.apache.sling.hc.core-1.0.4,org.apache.sling.hc.it-1.0.4,org.apache.sling.hc.jmx-1.0.4,org.apache.sling.hc.samples-1.0.4,org.apache.sling.hc.support-1.0.4,org.apache.sling.hc.webconsole-1.0.4,org.apache.sling.junit.healthcheck-1.0.6 (September 30th, 2013)
-* New Releases: Apache Sling Commons Log 3.0.2 (September 12th, 2013)
-* New Releases: Apache Sling Discovery Impl 1.0.0, Apache Sling Discovery Standalone 1.0.0, Apache Sling Discovery Support 1.0.0, Apache Sling Settings 1.3.0, and Apache Sling Event 3.2.0 (August 12th, 2013)
-* New Release: Apache Sling JCR Jackrabbit Server 2.1.2, Apache Sling Scripting JSP Taglib 2.2.0 (August 8th, 2013)
-* New Releases: Apache Sling JCR DavEx 1.2.0, Apache Sling JCR Webdav 2.2.0 (July 31st, 2013)
-* New Releases: Apache Sling Servlets Post 2.3.2, Apache Sling I18n 2.2.6, Apache Sling Commons FileSystem ClassLoader 1.0.0, Apache Sling JCR ClassLoader 3.2.0, and Apache Sling Parent POM 17 (July 18th, 2013)
-* New Release: Apache Sling Form Based Authentication Handler 1.0.4 (May 27th, 2013)
-* New Release: Apache Sling Scripting JSP 2.0.28 (May 16th, 2013)
-* New Releases: Apache Sling Servlets Post 2.3.0, Apache Sling JCR Resource 2.2.8 (May 10th, 2013)
-* New Releases: Apache Sling API 2.4.2, Apache Parent POM 16 (May 3rd, 2013)
-* New Releases: Apache Sling Tenant 1.0.0, Apache Sling Security 1.0.4, and Apache Sling javax.activation 0.1.0 (April 26th, 2013)
-* New Releases: Apache Sling API 2.4.0, Apache Sling Bundle Resource Provider 2.1.2, Apache Sling File System Resource Provider 1.1.2, Apache Sling JCR Resource 2.2.6, Apache Sling Resource Resolver 1.0.6, Apache Sling Servlets Resolver 2.2.4, Apache Sling Engine 2.2.8, and Apache Sling Auth Core 1.1.2 (April 18th, 2013)
-* New Releases: Apache Sling Launchpad Base 2.5.0, and Apache Sling Script Console 1.0.0 (March 4th, 2013)
-* New Releases: Apache Sling JCR Classloader 3.1.2, Apache Sling Commons Testing 2.0.14, Apache Sling JUnit Core 1.0.8, Apache Sling JUnit Remote 1.0.8, Apache Sling JUnit Scriptable 1.0.8, Apache Sling Testing Tools 1.0.6 (February 18th, 2013)
-* New Releases: Apache Sling Installer Core 3.4.6, Apache Sling Installer Configuration Factory 1.0.10, Apache Sling JCR Instaler 3.1.6, Apache Sling Parent 15, Apache Sling Fragment Extension XML 1.0.2, Apache Sling Fragment Extension WS 1.0.2, Apache Sling Fragment Extension Activation 1.0.2 (February 18th, 2013)
-* New Releases: Apache Sling Resource Resolver 1.0.4, Apache Sling JCR Resource 2.2.4 (February 14, 2013)
-* New Releases: Apache Sling Installer Core 3.4.4, Apache Sling JCR Resource 2.2.2, Apache Sling Resource Resolver 1.0.2, Apache Sling Security 1.0.2, Apache Sling Parent POM 14 (December 20th, 2012)
-* New Release: Apache Sling Servlet Resolver 2.2.2 (December 10th, 2012)
-* New Releases: Apache Sling Settings 1.2.2, Apache Sling Auth Core 1.1.0, Apache Sling Commons Logservice 1.0.2, Apache Sling Installer Core 3.4.2, Apache Sling Scripting JSP 2.0.26, Apache Sling Commons Compiler 2.1.0, Apache Sling JCR Compiler 2.1.0, Apache Sling I18n 2.2.4, Apache Sling JCR Classloader 3.1.10, Apache Sling JCR Webdav 2.1.2, Apache Sling JCR Davex 1.1.0 (November 30th, 2012)
-* New Releases: Apache Sling Maven Launchpad Plugin 2.2.0, Apache Sling Commons OSGi 2.2.0, Apache Sling Launchpad Installer 1.2.0, Apache Sling Rewriter 1.0.4, Apache Sling Settings 1.2.0 (November 19th, 2012)
-* New Releases: Apache Sling API 2.3.0, Apache Sling Bundle Resource Provider 2.1.0, Apache Sling File System Resource Provider 1.1.0, Apache Sling JCR Resource 2.2.0, Apache Sling Resource Resolver 1.0.0, Apache Sling Servlets Get 2.1.4, Apache Sling Servlets Post 2.2.0, Apache Sling Servlets Resolver 2.2.0, Apache Sling Adapter 2.1.0, Apache Sling Commons Testing 2.0.12 (November 15th, 2012)
-* New Release: Apache Sling JSP Taglib 2.1.8, Apache Sling Installer Core 3.4.0, Apache Sling Installer API 1.0.0, Apache Sling Installer Console 1.0.0, Apache Sling JCR Wrapper 2.0.0 (October 29th, 2012)
-* New Releases: Apache Sling Installer Core 3.3.8, Apache Sling Launchpad Installer 1.1.4, and Apache Sling Maven Launchpad Plugin 2.1.2 (August 19th, 2012)
-* New Release: Apache Sling Scripting JST 2.0.6 (August 17th, 2012)
-* New Releases: Apache Sling Adapter 2.0.16, Apache Sling JCR ContentLoader 2.1.6, and Apache Sling Parent POM 13 (July 9th, 2012)
-* Vulnerability report and fix: CVE-2012-2138 Apache Sling denial of service vulnerability (July 6th, 2012), see [http://s.apache.org/CVE-2012-2138](http://s.apache.org/CVE-2012-2138)
-* New Releases: Apache Sling Commons Compiler 2.0.6, Apache Sling Adapter 2.0.14, Apache Sling JCR ClassLoader 3.1.8, Apache Sling JCR Compiler 2.0.4, Apache Sling Scripting Core 2.0.24, Apache Sling Scripting Java 2.0.4, Apache Sling Scripting JSP 2.0.24, Apache Sling POST Servlets 2.1.2 (June 28th, 2012)
-* New Releases: Apache Sling Installer Factory Configuration 1.0.8, Apache Sling Engine 2.2.6, Apache Sling i18n 2.2.2, Apache Sling Scripting Core 2.0.22 (May 26th, 2012)
-* New Releases: Apache Sling Commons ClassLoader 1.3.0, Apache Sling Commons Compiler 2.0.4, Apache Sling Eventing 3.1.4, Apache Sling Installer Core 3.3.6, Apache Sling JCR Installer 3.1.4, Apache Sling JCR ClassLoader 3.1.6, Apache Sling JCR Resource 2.1.0, Apache Sling Launchpad Installer 1.1.2, Apache Sling Scripting Java 2.0.4, and Apache Sling Scripting JSP 2.0.22 (May 18th, 2012)
-* New Releases: Apache Sling Commons Testing 2.0.10, Apache Sling Commons Scheduler 2.3.4, Apache Sling Commons Log 3.0.0, Apache Sling Commons Log Service 1.0.0, Apache Sling Adapter 2.0.12, Apache Sling Installer Core 3.3.4, Apache Sling Launchpad API 1.1.0, Apache Sling Launchpad Installer 1.1.0, and Apache Sling Maven JSPC Plugin 2.0.6 (February 7th, 2012)
-* New Releases: Apache Sling API 2.2.4, Apache Sling Adapter 2.0.10, Apache Sling Scripting JSP Taglib 2.1.6, Apache Sling Rewriter 1.0.2, Apache Sling JCR ContentLoader 2.1.4, Apache Sling JCR Base 2.1.2, Apache Sling Servlet Resolver 2.1.2, and Apache Sling Security 1.0.0 (January 30th, 2012)
-* New Releases: Apache Sling Scripting API 2.1.4, Apache Sling Scripting Core 2.0.20, Apache Sling i18n 2.2.0, Apache Sling Installer Core 3.3.2, Apache Sling Scripting Java 2.0.2, and Apache Sling Scripting JSP 2.0.20 (January 16th, 2012)
-* New Releases: Apache Adapter Annotations 1.0.0 and Apache Sling Maven Sling Plugin 2.1.0 (January 14th, 2012)
-* New Releases: Apache Sling Settings 1.1.0, Apache Sling Commons ClassLoader 1.2.4, Apache Sling Commons Scheduler 2.3.2, Apache Sling 3.1.2, Apache Sling Installer Core 3.3.0, Apache Sling Installer Configuration Factory 1.0.4, Apache Sling Launchpad Installer 1.0.6, Apache Sling JCR Installer 3.1.2, and Apache Sling Thread Dumper 0.2.2 (January 6th, 2012)
-* New Release: Apache Sling Jackrabbit User Manager 2.2.0 (November 15th, 2011)
-* New Release: Apache Sling Maven Sling Plugin 2.0.6 (October 21st, 2011)
-* New Release: Apache Sling Maven Launchpad Plugin 2.1.0 (September 9th, 2011)
-* New Releases: Apache Sling Resource Bundle 1.0.0 and Parent POM 12
-* New Releases: Apache Sling API 2.2.2, Apache Sling Commons Scheduler 2.3.0, Apache Sling Commons OSGi 2.1.0, Apache Sling Scripting Core 2.0.18, Apache Sling Installer Core 3.2.2, Apache Sling Installer Configuration Factory 1.0.2, Apache Sling Launchpad Installer 1.0.4, Apache Sling File Installer 1.0.2 (August 16th, 2011)
-* New Release: Apache Sling Scripting JSP Support 2.0.18 (August 15th, 2011)
-* Released new Apache Sling Parent POM 11 (August 8, 2011)
-* New Release: Apache Sling Internationalization 2.1.2 (July 15, 2011)
-* New Releases: Apache Sling Event 3.1.0, Apache Sling OSGi Installer 3.2.0, Apache Sling JCR Installer 3.1.0, Apache Sling Installer Configuration Factory 1.0.0, Apache Sling Launchpad Installer 1.0.2 (July 13th, 2011)
-* New Release: Apache Sling Engine 2.2.4 (June 22nd, 2011)
-* New Releases: Apache Sling Launchpad Standalone Archetype 1.0.0, Launchpad Webapp Archetype 1.0.0 (May 13th, 2011)
-* New Releases: Apache Sling Scripting JSP Support 2.0.16, JSP Taglib 2.1.2 (May 3rd, 2011)
-* New releases: Apache Sling Test Tools 1.0.2, JUnit Core 1.0.6, JUnit Remote Tests Runners 1.0.6, JUnit Scriptable Tests Provider 1.0.6, Sample Integration Tests 1.0.6, Sample Server-Side Tests 1.0.6, Failing Server-Side Tests 1.0.6 (April 26th, 2011)
-* New releases: Apache Sling I18N 2.1.0 (April 12, 2011)
-* New releases: [Apache Sling 6](http://markmail.org/thread/hv5vd5774ofwqu6j), Apache Sling Launchpad Content 2.0.6 (March 28, 2011)
-* New releases: Apache Sling Launchpad Integration Tests 1.0.0, Apache Sling Launchpad Testing Services 2.0.8, Apache Sling Launchpad Testing Services WAR 2.0.8 (March 04, 2011)
-* New releases: Apache Sling Javascript 2.0.12 (February 26, 2011)
-* New releases: Apache Sling Explorer 1.0.2, Apache Sling JCR Resource 2.0.10, Apache Sling Engine 2.2.2, Apache Sling Installer IT Testing 3.1.2 (February 24, 2011)
-* New releases: Apache Sling Launchpad API 1.0.0, Launchpad Installer 1.0.0 Launchpad Base 2.3.0, Maven Launchpad Plugin 2.0.10, Apache Sling Commons Testing 2.0.8 (February 20, 2011)
-* New release: Apache Sling Servlets Get 2.1.2 (February 18, 2011)
-* Carl Hall added as a committer (February 18, 2011)
-* New releases: Apache Sling Installer Core 3.1.2, Apache Sling JCR Installer 3.0.4, and Apache Sling Event 3.0.2 (February 4, 2011)
-* New release: Apache Sling Scripting Core 2.0.16 (January 29, 2011)
-* New releases: Apache Sling JCR Resource 2.0.8, Apache Sling Engine 2.2.0, Apache Sling Bundle Resource Provider 2.0.6, Apache Sling File Resource Provider 1.0.2, Apache Sling Auth Core 1.0.6, Apache Sling Auth Selector 1.0.4 (January 28, 2011)
-* New releases: Apache Sling Commons Compiler 2.0.2, Apache Sling JCR Compiler 2.0.2, Apache Sling Commons Log 2.1.2, Apache Sling Event 3.0.0, Apache Sling Scripting JSP 2.0.14, Apache Sling Installer Core 3.1.0, Apache Sling JCR Installer 3.0.2 (January 21, 2011)
-* New release: Apache Sling Maven Launchpad Plugin 2.0.8 (December 20, 2010)
-* New releases: Apache Sling Commons Compiler 2.0.0, Apache Sling i18n 2.0.4, Apache Sling Commons Json 2.0.6, Apache Sling Commons Log 2.1.0, Apache Sling Scripting Java 2.0.0, Apache Sling Scripting JST 2.0.4, Apache Sling Scripting API 2.1.2, Apache Sling Scripting JSP 2.0.12, Apache Sling Scripting Javascript 2.0.10, Apache Sling JCR Compiler 2.0.0, Apache Sling Auth Core 1.0.4, Apache Sling Auth Selector 1.0.2, Apache Sling Auth Form 1.0.2, Apache Sling Auth OpenId 1.0.2, Apache Sling JCR ContentLoader 2.1.2 (December 20, 2010)
-* New releases: Apache Sling API 2.20, Apache Sling Adapter 2.0.8, Apache Sling Commons ClassLoader 1.2.2, Apache Sling JCR ClassLoader 3.1.4, Apache Sling Parent POM 10 (December 13, 2010)
-* New release: Apache Sling JCR Web Console Plugin 1.0.0 (November 16, 2010)
-* New releases: Apache Sling JCR Access Manager 2.1.0, JCR User Manager 2.1.0, JCR WebDAV support 2.1.0, and JCR DavEX support 1.0.0 (November 8, 2010)
-* New release: Apache Sling Explorer 1.0.0 (November 1, 2010)
-* New release: Apache Sling Scripting Core 2.0.14 (October 25, 2010)
-* New releases: Apache Sling Commons Threads 3.1.0, Apache Sling Event 2.4.2, Apache Sling I18N 2.0.2, Apache Sling Rewriter 1.0.0, and Apache Sling Settings 1.0.2 (October 15, 2010)
-* New releases: Apache Sling Installer Core 3.0.0, Apache Sling Installer File Provider 1.0.0, and Apache Sling Installer JCR Provider 3.0.0 (September 24, 2010)
-* New release: Apache Sling Commons Testing 2.0.6 (September 20, 2010)
-* New releases: Apache Sling JCR API 2.1.0, Apache Sling JCR Base 2.1.0, Apache Sling JCR Content Loader 2.1.0, Apache Sling Jackrabbit Server 2.1.0 (September 10, 2010)
-* New releases: Apache Sling Commons Threads 3.0.2, Apache Sling Event 2.4.0 (September 06, 2010)
-* New releases: Apache Sling Commons ClassLoader 1.2.0, Apache Sling JCR ClassLoader 3.1.2 (August 30, 2010)
-* New release: Apache Sling Web Console Branding 1.0.0, Apache Sling Web Console Security Provider 1.0.0 (August 25, 2010)
-* New release: Apache Sling API 2.1.0 (August 21, 2010)
-* New release: Apache Sling GWT Integration 3.0.0 (July 30, 2010)
-* New releases: Apache Sling Commons OSGi 2.0.6, Launchpad Base 2.2.0 and Maven Launchpad Plugin 2.0.6 (April 27, 2010)
-* New releases: Apache Sling Event 2.3.0, Apache Sling Scripting Core 2.1.0, Apache Commons MIME 2.1.4, and Apache Sling FileResource Provider 1.0.0 (March 1, 2010)
-* Eric Norman added as a committer (February 17, 2010)
-* New release: Apache Sling Sample Path Based Resource Type Provider 2.0.4 (February 22, 2010)
-* New releases: Apache Sling Event 2.2.0, Apache Sling Scripting API 2.1.0, and Apache Sling Thread Dumper 0.2.0 (Feburary 19, 2010)
-* New releases: Apache Sling JCR WebDav 2.0.8, Apache Sling JCR ContentLoader 2.0.6, Apache Sling JCR UserManager 2.0.4, Apache Sling JCR Server 2.0.6, Apache Sling JCR AccessManager 2.0.4, Apache Sling JCR Base 2.0.6 (February 17, 2010)
-* New releases: Apache Sling Commons ClassLoader 1.1.4, and Apache Sling JCR ClassLoader 3.1.0 (February 8, 2010)
-* New release: Apache Sling JCR API 2.0.6 (January 29, 2010)
-* New releases: Apache Sling Commons ClassLoader 1.1.2, Apache Sling Commons Scheduler 2.2.0, Apache Sling Commons Threads 3.0.0, Apache Sling Event 2.1.0, and Apache Sling Servlets Get 2.0.8 (December 21, 2009)
-* Apache Sling MIME type mapping support, Version 2.1.2, is released (December 15, 2009)
-* Justin Edelson added as a committer (December 7, 2009)
-* New releases: Apache Sling Commons HTML 1.0.0, Apache Sling Commons Compiler 1.0.0, Apache Sling JCR Compiler 1.0.0, Apache Sling JCR Prefs 1.0.0, and Apache Sling Scripting Java 1.0.0 (December 2, 2009)
-* New releases: Apache Sling Parent POM 8, Apache Sling Launchpad Base 2.1.0, Apache Sling Commons ClassLoader 1.1.0, Apache Sling JCR ClassLoader 3.0.0, Apache Sling Scripting Core 2.0.8, Apache Sling Scripting JSP 2.0.8, Apache Sling Scripting JSP Taglib 2.0.6, and Apache Sling Scripting JavaScript 2.0.6 (November 28, 2009)
-* New releases: Apache Sling Engine 2.0.6, Apache Sling Adapter 2.0.4, Apache Sling JCR Resource 2.0.6, Apache Sling Commons ClassLoader 1.0.0, Apache Sling Event 2.0.6, Apache Sling JCR ClassLoader 2.0.6, Apache Sling Scripting Core 2.0.6, Apache Sling Servlets Resolver 2.0.8 (October 13, 2009)
-* New releases: Apache Sling API 2.0.8, Apache Sling Commons HTML 0.9.0, Apache Sling Commons ClassLoader 0.9.0, Apache Sling Commons Scheduler 2.1.0, and Apache Sling Servlets Get 2.0.6 (October 02, 2009)
-* New releases: Apache Sling API 2.0.6 and Apache Sling JCR API 2.0.4 (August 17, 2009)
-* Apache Sling OSGi LogService Implementation, Version 2.0.6, is released (August 5, 2009)
-* Ian Boston added as a member of the PMC (July 25, 2009)
-* Ian Boston added as a committer (July 9, 2009)
-* Sling site at http://sling.apache.org live (June 29, 2009)
-* Mailing lists moved to dev(a)sling.apache.org and commits(a)sling.apache.org (June 29, 2009)
-* SVN moved to http://svn.apache.org/repos/asf/sling (June 18, 2009)
-* Apache Sling has graduated into a top level project! (June 17, 2009)
-
-
-[1]: http://s.apache.org/CVE-2012-2138
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/news/sling-ide-tooling-11-released.md
----------------------------------------------------------------------
diff --git a/content/news/sling-ide-tooling-11-released.md b/content/news/sling-ide-tooling-11-released.md
deleted file mode 100644
index 4dad4f6..0000000
--- a/content/news/sling-ide-tooling-11-released.md
+++ /dev/null
@@ -1,42 +0,0 @@
-title=Apache Sling IDE Tooling 1.1 released
-type=page
-status=published
-~~~~~~
-
-Here are some of the more noteworthy things available in this release.
-
-Sightly support
-==
-
-Sightly support has been added through an additional, optional, feature named _Sling IDE Tools - Sightly Integration_.
-
-This feature provides the following enhancements:
-
-* auto-completion of tag named and attributes names in the HTML Editor
-* wizards for creating new Sightly scripts and Use Classes ( Java and Javascript )
-* Sightly-aware validation for HTML files
-
-![Sightly Editor](../documentation/development/ide-tooling/sightly-editor.png)
-
-These enhancements are enabled once the Sightly facet is added to a project. This is done automatically when converting a project to content project, but can also be done manually via the project properties, under the _Project Facets_ page.
-
-Automatic configuration of debug classpath based on the bundles deployed on the server
-==
-
-When first connecting to a Sling instance, the IDE tooling tries to bind all the sources associated with the bundles deployed on the server and retrieves the associated source artifacts using Maven. Therefore, the debug classpath is as close as possible to sources used to build the bundles deployed on the server.
-
-![Debugging](../documentation/development/ide-tooling/debug.png)
-
-Since a first source bundle resolution can potentially take a long time, this behaviour can be disabled from the server configuration page.
-
-Maven configurator for content-package projects
-==
-
-Maven projects configured using the `com.day.jcr.vault:content-package-maven-plugin` are now automatically configured as content projects, removing the need to manually add the needed facets after importing them into Eclipse for the first time.
-
-Other minor improvements
-==
-
-* Keyboard shortcuts now work in the content navigator
-* When creating a new server in the project creation wizard, sensible defaults are filled in
-* When connecting to a server, all support bundles are automatically installed
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/news/sling-launchpad-8-released.md
----------------------------------------------------------------------
diff --git a/content/news/sling-launchpad-8-released.md b/content/news/sling-launchpad-8-released.md
deleted file mode 100644
index b03154c..0000000
--- a/content/news/sling-launchpad-8-released.md
+++ /dev/null
@@ -1,59 +0,0 @@
-title=Apache Sling Launchpad 8 released
-type=page
-status=published
-~~~~~~
-
-Here are some of the more noteworthy things available in this release.
-
-Switched to Apache Jackrabbit Oak
----
-
-The Sling launchpad has switched from Apache Jackrabbit 2.7.5 to Apache Jackrabbit Oak 1.3.7 as a persistence engine. Apache Jackrabbit Oak is now supported in Sling with two persistence modes: SegmentNodeStore ( file-based ) and DocumentNodeStore ( MongoDB-based ). See [the Oak documentation](http://jackrabbit.apache.org/oak/docs/index.html) for more details about the Oak persistence modes and [the Sling Launchpad documentation](https://sling.apache.org/documentation/the-sling-engine/the-sling-launchpad.html#launchpad-app-and-launchpad-webapp) for details about configuring the persistence mode.
-
-Provisioning model
----
-
-Sling is now provisioned using a simple, text-based, model. See See [the Sling Provisioning Model documentation](http://sling.apache.org/documentation/development/slingstart.html) for details.
-
-Sightly
----
-
-Sightly is an HTML templating language, similar to JSP (Java Server Pages) and ESP (ECMAScript Server Pages). The name “Sightly” (meaning “pleasing to the eye”) highlights its focus on keeping your markup beautiful, and thus maintainable, once made dynamic.
-
-The cornerstones of Sightly are:
-
-- Secure by default: Sightly automatically filters and escapes all variables being output to the presentation layer to prevent cross-site-scripting (XSS) vulnerabilities
-- Supports separation of concerns: The expressiveness of the Sightly template language is purposely limited, in order to make sure that a real programming language is used to express the corresponding presentation logic
-- Built on HTML 5: A Sightly file is itself a valid HTML5 file. All Sightly-specific syntax is expressed either within a data attribute, or within HTML text.
-
-See [the Sightly HTML Templating Language Specification](https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/master/SPECIFICATION.md) for details.
-
-Versioning support in the Resource API
----
-
-The Java Resource API and the HTTP API are now able to work with versioned resources. See [SLING-848 - Support getting versioned resources by using uri path parameters](https://issues.apache.org/jira/browse/SLING-848) for more details.
-
-Improved testing tools
----
-
-The Sling testing tools have seen numerous additions since the last release, including a family of Mock libraries known as the Sling Mocks and a Teleporter JUnit module for running Sling tests in provisioned Sling instances. For more details, see the documentation on [JUnit server-side testing support bundles](https://sling.apache.org/documentation/bundles/org-apache-sling-junit-bundles.html) and [Sling Mocks](https://sling.apache.org/documentation/development/sling-mock.html) .
-
-Servlet API 3.0
----
-
-Sling now uses and requires Servlet API 3.0. See [JSR 315: JavaTM Servlet 3.0 Specification](https://jcp.org/en/jsr/detail?id=315) for details.
-
-Performance
----
-
-Various performance and concurrency improvements were added to the Engine and JCR Resource bundles.
-
-Dependency updates
----
-
-Some of the notable dependency updates are:
-
-* Apache Felix has been upgraded to version 5.2.0
-* Apache Tika has been updated to version 1.10
-* Apache HttpClient 4.4 has been added
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/news/sling-launchpad-9-released.md
----------------------------------------------------------------------
diff --git a/content/news/sling-launchpad-9-released.md b/content/news/sling-launchpad-9-released.md
deleted file mode 100644
index 13f203c..0000000
--- a/content/news/sling-launchpad-9-released.md
+++ /dev/null
@@ -1,88 +0,0 @@
-title=Apache Sling Launchpad 9 released
-type=page
-status=published
-~~~~~~
-
-Here are some of the more noteworthy things available in this release.
-
-Updated to Oak 1.6.1 and segment-tar persistence
----
-
-We now include the latest stable version of Oak and have switched to the latest
-form of the disk-based persitence - oak-segment-tar. This module provides better
-runtime characteristics when compared to the oak-segment persistence and also
-allows reliable online compaction of the repository.
-
-If you're upgrading from a previous version of Sling you will need to manually
-upgrade the repository. See the [Oak documentation on Repository migration](http://jackrabbit.apache.org/oak/docs/migration.html)
-for more details.
-
-The Sling Explorer is replaced with Composum
----
-
-The Sling Launchpad ships with a new repository explorer and administration tool - [Composum](https://github.com/ist-dresden/composum). Composum is more reliable and featureful compared to the previous Sling explorer.
-
-The Slingshot sample is included
----
-
-The default Sling configuration now includes the Slingshot sample. Slingshot exemplifies
-how to build and deploy a Sling application.
-
-New Resource Provider and Observation API
----
-
-The Resource Provider API has been replaced with a new implementation, which is more performant
-and better suited for future evolution. Existing ResourceProvider will be able to work using
-a backwards-compatible layer, but developers are nonetheless encouraged to move to the
-new implementation.
-
-In the same manner, the Observation API has been refreshed.
-
-New modules added: Validation, Context-Aware Configuration, Repository Initialization Language
----
-
-A number of new general-purpose modules have been added to the Sling Launchpad:
-
-* [Validation](/documentation/bundles/validation.html)
-* [Context-Aware configuration](/documentation/bundles/context-aware-configuration/context-aware-configuration.html)
-* [Repository Initialization Language](/documentation/bundles/repository-initialization.html)
-
-Tooling: HTL Maven Plugin
----
-
-The [HTL Maven Plugin](http://sling.apache.org/components/htl-maven-plugin/) provides build-time validation for projects using HTL. Furthermore, the HTL engine has been modularised into an HTL Compiler, an HTL Java Compiler and an HTL Script Engine, with the first two allowing to build other HTL tools in a Sling-independent way.
-
-Streaming Upload Support
----
-
-The version of the Sling Engine shipped in the Launchpad now supports streaming uploads,
-for better I/O throughput. Streaming uploads are opt-in via setting the following HTTP Header:
-
-Sling-UploadMode: stream
-
-Discovery: added Oak-based discovery implementation
----
-
-The Sling discovery mechanism has been augmented with a mechanism which delegates instance
-discovery to Oak. When working with a DocumentNodeStore-based Oak implementation, this information
-is already available to Oak so there is no point in duplicating the work.
-
-Security: loginAdministrative deprecation
----
-
-We believe that the vast majority of bundles performing background work do not require
-administrative access to the repository via `loginAdministrative`. We have removed many usages
-of `loginAdministrative` in the Sling code and replaced then with a service-based approach
-- `loginService`. We encourage you to do the same.
-
-Documentation available at [Service Authentication](/documentation/the-sling-engine/service-authentication.html).
-
-Removed org.apache.sling.commons.json and org.json bundles
----
-
-Apache projects are no longer allowed, for legal reasons, to ship code which uses or links to the
-JSON.org Java implementation. As a consequence we have removed all code which references that
-API.
-
-If you need to use these bundles, you can always retrieve then from Maven Central and incorporate
-them in your launchpad.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/obr/obr2html.xsl
----------------------------------------------------------------------
diff --git a/content/obr/obr2html.xsl b/content/obr/obr2html.xsl
deleted file mode 100644
index b41765d..0000000
--- a/content/obr/obr2html.xsl
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="html"/>
-
- <xsl:template match="/">
- <html>
- <xsl:apply-templates/>
- </html>
- </xsl:template>
-
- <xsl:template match="repository">
- <head>
-
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"/>
- <title>
- <xsl:value-of select="@name"/>
- </title>
- <link href="http://www2.osgi.org/www/osgi.css" type="text/css" rel="stylesheet"/>
-
- <script type='text/javascript'>
- // <![CDATA[
- function toggle( /* String */ elementId )
- {
- var element = document.getElementById( elementId );
- if (element)
- {
- if (element.style.display == "none")
- {
- element.style.display = "inline";
- }
- else
- {
- element.style.display = "none";
- }
- }
- }
- // ]]>
- </script>
- </head>
- <body>
- <h1>
- <xsl:value-of select="@name"/>
- </h1>
-
- <p>Last modified
- <xsl:value-of select="@lastmodified"/>.</p>
-
- <h2><a href="javascript:toggle('referrals')" title="Click to toggle visibility of Referrals">Referrals</a></h2>
- <table id="referrals" width="100%">
- <tr><th>Hop Count</th><th>Link</th></tr>
- <xsl:apply-templates select="referral">
- </xsl:apply-templates>
- </table>
-
- <h2><a href="javascript:toggle('resources')" title="Click to toggle visibility of Referrals">Resources</a></h2>
- <table id="resources" width="100%">
- <tr><th>Link</th><th>Version</th><th>doc/src</th><th>Description</th><th>Bytes</th></tr>
- <xsl:apply-templates select="resource">
-
- <xsl:sort select="@presentationname"/>
- </xsl:apply-templates>
- </table>
- </body>
- </xsl:template>
-
- <xsl:template match="referral">
- <tr>
- <td><xsl:value-of select="@depth"/></td>
- <td>
- <a href="{@url}"><xsl:value-of select="@url"/></a>
- </td>
- </tr>
-
-
- </xsl:template>
-
- <xsl:template match="resource">
- <tr>
- <td nowrap="true">
- <a href="{@uri}"><xsl:value-of select="@presentationname"/></a>
-
-
- </td>
- <td><xsl:value-of select="@version"/></td>
- <td>
- <xsl:if test="documentation">
- <a href="{documentation}">D</a>
- </xsl:if>
- <xsl:if test="source">
- <a href="{source}">S</a>
-
- </xsl:if>
- </td>
- <td>
- <xsl:value-of select="description"/>
- </td>
- <td>
- <xsl:value-of select="size"/>
- </td>
- </tr>
-
-
- </xsl:template>
-
- <!--
- <xsl:template match="*">
- <tr>
- <td><xsl:value-of select="name()"/></td>
- <td><xsl:value-of select="."/></td>
- </tr>
- </xsl:template>
- -->
- <!--
- <xsl:template match="*">
- </xsl:template>
- -->
-
-</xsl:stylesheet>
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/obr/repository.xml
----------------------------------------------------------------------
diff --git a/content/obr/repository.xml b/content/obr/repository.xml
deleted file mode 100644
index 467b111..0000000
--- a/content/obr/repository.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
-<?xml-stylesheet type="text/xml" href="obr2html.xsl"?>
-<repository lastmodified="20090518144500" name="Apache Sling Master Repository">
- <referral url="http://felix.apache.org/obr/releases.xml" depth="1" />
- <referral url="http://incubator.apache.org/sling/obr/sling.xml" depth="1" />
- <referral url="http://incubator.apache.org/sling/obr/thirdparty.xml" depth="1" />
-</repository>
[39/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/getting-started.html
----------------------------------------------------------------------
diff --git a/documentation/getting-started.html b/documentation/getting-started.html
new file mode 100644
index 0000000..7eb4952
--- /dev/null
+++ b/documentation/getting-started.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Getting Started</h1></header><p>We're on the way to update the documentation to make it more easy to get in touch with Sling. At the moment we can give you the following starting points:</p>
+<p>{% for label, page in children %}* [{{ page.headers.title }}]({{ page.path }}) {% endfor %}</p>
+<h2>Where to head from here</h2>
+<p>We recommend you read through following topics to get as fast as possible into Sling:</p>
+<ul>
+ <li><a href="/documentation/development/getting-and-building-sling.html">Getting and building Sling</a></li>
+ <li><a href="/documentation/the-sling-engine/architecture.html">Architecture</a></li>
+ <li><a href="/documentation/the-sling-engine/dispatching-requests.html">Dispatching Requests</a></li>
+ <li><a href="/documentation/the-sling-engine/resources.html">Resources</a></li>
+ <li><a href="/documentation/development/ide-tooling.html">{{ refs.ide-tooling.headers.title }}</a></li>
+ <li><a href="/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html">Manipulating Content - The SlingPostServlet (servlets.post)</a></li>
+ <li><a href="/documentation/the-sling-engine/request-parameters.html">Request Parameters</a></li>
+ <li><a href="/documentation/the-sling-engine/authentication.html">Authentication</a></li>
+ <li>[Eventing and Jobs]({{ refs.eventing-and-jobs.path }})</li>
+</ul></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/getting-started/discover-sling-in-15-minutes.html
----------------------------------------------------------------------
diff --git a/documentation/getting-started/discover-sling-in-15-minutes.html b/documentation/getting-started/discover-sling-in-15-minutes.html
new file mode 100644
index 0000000..a8adb75
--- /dev/null
+++ b/documentation/getting-started/discover-sling-in-15-minutes.html
@@ -0,0 +1,129 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Discover Sling in 15 minutes</h1></header><p>The Sling Launchpad is a ready-to-run Sling configuration, providing an embedded JCR content repository and web server, a selection of Sling components, documentation and examples. The Launchpad makes it easy to get started with Sling and to develop script-based applications.</p>
+<p>This page will help you get started with the Launchpad. Fifteen minutes should be enough to get an overview of what Sling does.</p>
+<p>While simple to run and understand, the Launchpad is a full-featured instance of Sling, an example configuration that we have created with the most common modules and configurations. The full functionality of Sling is available by loading additional Sling (or custom) OSGi bundles as needed, using the Launchpad's web-based OSGi management console.</p>
+<p>[TOC]</p>
+<h2>See Also</h2>
+<p>More Sling samples can be found under <a href="http://svn.apache.org/repos/asf/sling/trunk/samples/">http://svn.apache.org/repos/asf/sling/trunk/samples/</a></p>
+<p>Once you grok the basic examples of this page, we recommend studying the <em>slingbucks</em> and <em>espblog</em> samples. Both have README files with more info.</p>
+<h2>Prerequisites</h2>
+<p>We'll start with the self-runnable jar from the Sling distribution, you only need a Java 7 JDK. Download the latest release from the Sling <a href="/downloads.cgi">Downloads</a> page or by clicking this link: <a href="http://www.apache.org/dyn/closer.lua/sling/org.apache.sling.launchpad-8.jar">org.apache.sling.launchpad-8.jar</a>. Alternatively you can deploy the <a href="http://www.apache.org/dyn/closer.lua/sling/org.apache.sling.launchpad-8-webapp.war">Sling Web application</a> into any decent Servlet Container such as Jetty or Tomcat or you can <a href="/documentation/development/getting-and-building-sling.html">build the current source yourself</a>.</p>
+<p>To show the simplicity of the REST-style approach taken by Sling the examples below will be using <a href="http://curl.haxx.se/">cURL</a>. Any HTTP client would do, but cURL is the easiest to document in a reproducible way.</p>
+<p>A WebDAV client makes editing server-side scripts much more convenient, but to make our examples easy to reproduce, we're using cURL below to create and update files in the JCR repository, via the Sling WebDAV server.</p>
+<h2>Start the Launchpad</h2>
+<p>After downloading the Sling Launchpad self-runnable jar just start it as follows:</p>
+<p>$ java -jar org.apache.sling.launchpad-8.jar</p>
+<p>This starts the Sling embedded Web Server on port 8080 and writes application files into the <code>sling</code> folder found in the current working directory.</p>
+<p>Once started, look at <a href="http://localhost:8080/system/console/bundles">http://localhost:8080/system/console/bundles</a> with your browser. Use <em>admin</em> with password <em>admin</em> if Sling asks you for a login. Sling then displays the <em>Felix Web Management Console</em> page.</p>
+<p>On the bundles page, all bundles should be marked <em>Active</em>. They're all <a href="http://www.osgi.org/">OSGi</a> bundles powered by <a href="http://felix.apache.org">Apache Felix</a>, but that doesn't really matter to us right now.</p>
+<p><em>Log files: If things go wrong, have a look at the <code>sling/logs/error.log</code> log file - that's where Sling writes any error messages.</em></p>
+<h2>Create some content</h2>
+<p>Until we have ready-to-test forms, you can create content with cURL, or you can create an HTML form that posts to the specified URL.</p>
+<p>To create a content node (nodes are a <a href="http://jackrabbit.apache.org/">JCR</a> concept, a unit of storage) with cURL, use:</p>
+<p>curl -u admin:admin -F"sling:resourceType=foo/bar" -F"title=some title" http://localhost:8080/content/mynode</p>
+<p>The resulting node can be seen at <a href="http://localhost:8080/content/mynode.html.path">http://localhost:8080/content/mynode.html</a>, or as json format under <a href="http://localhost:8080/content/mynode.json">http://localhost:8080/content/mynode.json</a>. Lets try with cURL:</p>
+<p>$ curl http://localhost:8080/content/mynode.json</p>
+<p>This returns the properties of the <code>/content/mynode</code> in JSON format as we have created it above.</p>
+<p>{"title":"some title","sling:resourceType":"foo/bar","jcr:primaryType":"nt:unstructured"}</p>
+<p>The additional property <code>jcr:primaryType</code> is a special JCR property added by the content repository, indicating the JCR primary node type.</p>
+<p><em>Monitoring requests: Sling provides a simple tool (an OSGi console plugin) to monitor HTTP requests, which helps understand how things work internally. See the <a href="/documentation/development/monitoring-requests.html">Monitoring Requests</a> page for details.</em></p>
+<h2>Render your content using server-side javascript (ESP)</h2>
+<p>Sling uses scripts or servlets to render and process content.</p>
+<p>Several scripting languages are available as additional Sling modules (packaged as OSGi <em>bundles</em> that can be installed via the Sling management console), but the launchpad currently includes the ESP (server-side ECMAscript), JSP (Java Server Pages), and Groovy language modules by default.</p>
+<p>To select a script, Sling uses the node's <em>sling:resourceType</em> property, if it is set.</p>
+<p>That is the case in our example, so the following script will be used by Sling to render the node in HTML, if the script is found at <em>/apps/foo/bar/html.esp</em> in the repository.</p>
+<html>
+<body>
+<h1><%= currentNode.title %></h1>
+</body>
+</html>
+<p>To select the script, Sling:</p>
+<ul>
+ <li>looks under <em>/apps</em></li>
+ <li>and appends the <em>sling:resourceType</em> value of our node ( which is <em>foo/bar</em> )</li>
+ <li>and appends <em>html.esp</em>, as the extension of our URL is <em>html</em> and the language of our script is <em>esp</em>.</li>
+</ul>
+<p>Store this script under <em>/apps/foo/bar/html.esp</em>, either using a WebDAV client (connected to <a href="http://admin:admin@localhost:8080/">http://admin:admin@localhost:8080/</a>), or using cURL as shown here, after creating the <em>html.esp</em> script in the current directory on your system:</p>
+<p>curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo/bar</p>
+<p>create a local file <em>html.esp</em> and copy above content.</p>
+<p>curl -u admin:admin -T html.esp http://localhost:8080/apps/foo/bar/html.esp</p>
+<p>The HTML rendering of your node, at <a href="http://localhost:8080/content/mynode.html">http://localhost:8080/content/mynode.html</a>, is now created by this ESP script. You should see the node's title alone as an <h1> element in that page.</p>
+<p>A script named <em>POST.esp</em> instead of <em>html.esp</em> would be called for a POST request, <em>DELETE.esp</em> for DELETE, <em>xml.esp</em> for a GET request with a <em>.xml</em> extension, etc. See <a href="/documentation/the-sling-engine/url-to-script-resolution.html">URL to Script Resolution</a> on the Sling wiki for more info.</p>
+<p>Servlets can also be easily "wired" to handle specific resource types, extensions, etc., in the simplest case by using SCR annotations in the servlet source code. Servlets and scripts are interchangeable when it comes to processing Sling requests.</p>
+<h2>What next?</h2>
+<p>These simple examples show how Sling uses scripts to work with JCR data, based on <em>sling:resourceType</em> or node types.</p>
+<p>There's much more to Sling of course - you'll find some additional simple examples below, as well as above in the <em>see also</em> section.</p>
+<h2>Additional examples</h2>
+<h3>Let Sling generate the path of a newly created node.</h3>
+<p>To create a node with a unique path at a given location, end the URL of the POST request with <em>/</em>.</p>
+<p>In this case, the Sling response redirects to the URL of the created node.</p>
+<p>Start by creating a new <em>/blog</em> folder:</p>
+<p>curl -X POST -u admin:admin "http://localhost:8080/content/blog"</p>
+<p>And create a node with a Sling-generated name under it:</p>
+<p>curl -D - -u admin:admin -F"title=Adventures with Sling" "http://localhost:8080/content/blog/"</p>
+<p>Using cURL's <em>-D</em> option shows the full HTTP response, which includes a <em>Location</em> header to indicate where the new node was created:</p>
+<p>Location: /blog/adventures_with_slin</p>
+<p>The actual node name might not be <em>adventures_with_slin</em> - depending on existing content in your repository, Sling will find a unique name for this new node, based on several well-know property values like title, description, etc. which are used for this if provided.</p>
+<p>So, in our case, our new node can be displayed in HTML via the <a href="http://localhost:8080/blog/adventures*with*slin.html">http://localhost:8080/blog/adventures_with_slin.html</a> URL.</p>
+<p>Note that we didn't set a <em>sling:resourceType</em> property on our node, so if you want to render that node with a script, you'll have to store the script under <em>/apps/nt/unstructured/html.esp</em>.</p>
+<h3>Add a page header with sling.include</h3>
+<p>The <em>sling.include</em> function can be called from scripts to include the rendered result of another node.</p>
+<p>In this example, we create a node at <em>/content/header</em>, rendered with a logo using an <em>html.esp</em> script, then use that header at the top of the <em>html.esp</em> script that we created previously for the <em>foo/bar</em> resource type.</p>
+<p>Start by checking that <a href="http://localhost:8080/content/mynode.html">http://localhost:8080/content/mynode.html</a> is rendered using the <em>html.esp</em> script created above.</p>
+<p>Create this script and name it <em>header.esp</em>:</p>
+<div>
+<p style="color:blue;">
+<img src="/images/sling.jpg" align="right"/>
+<%= currentNode.headline %>
+</p>
+</div>
+<p>Upload it so that it is used to render resources having <em>sling:resourceType=foo/header</em>:</p>
+<p>curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo/header/ curl -u admin:admin -T header.esp http://localhost:8080/apps/foo/header/html.esp</p>
+<p>Create the header node:</p>
+<p>curl -u admin:admin -F"sling:resourceType=foo/header" -F"headline=Hello, Sling world" http://localhost:8080/content/header</p>
+<p>Upload the logo that the script uses (using sling.jpg or another logo in the current directory):</p>
+<p>curl -X MKCOL -u admin:admin http://localhost:8080/images/ curl -u admin:admin -T sling.jpg http://localhost:8080/images/sling.jpg</p>
+<p>And check that the header is rendered with the logo at <a href="http://localhost:8080/content/header.html">http://localhost:8080/content/header.html</a>.</p>
+<p>Now, update the html.esp script that we created for our first example above, to include the header:</p>
+<html>
+<body>
+<div id="header">
+<% sling.include("/content/header"); %>
+</div>
+<h1><%= currentNode.title %></h1>
+</body>
+</html>
+<p>And upload it again to replace the previous version:</p>
+<p>curl -u admin:admin -T html.esp http://localhost:8080/apps/foo/bar/html.esp</p>
+<p>The <a href="http://localhost:8080/content/mynode.html">http://localhost:8080/content/mynode.html</a>, once refreshed, now shows the blue headline and logo, and this layout also applies to any node created with <em>sling:resourceType=foo/bar</em>.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/legacy/logging.html
----------------------------------------------------------------------
diff --git a/documentation/legacy/logging.html b/documentation/legacy/logging.html
new file mode 100644
index 0000000..fea005c
--- /dev/null
+++ b/documentation/legacy/logging.html
@@ -0,0 +1,211 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Logging</h1></header><div class="note">
+This document is for 3.x release of Sling Commons Log components. Refer to
+<a href="http://sling.apache.org/documentation/development/logging.html">Logging</a> for documentation related
+to newer version.
+</div>
+<h2>Introduction</h2>
+<p>Logging in Sling is supported by the <code>org.apache.sling.commons.log</code> bundle, which is one of the first bundles installed and started by the Sling Launcher. The <code>org.apache.sling.commons.log</code> bundle has the following tasks:</p>
+<ul>
+ <li>Implements the OSGi Log Service Specification and registers the <code>LogService</code> and <code>LogReader</code> services</li>
+ <li>Exports three commonly used logging APIs:</li>
+ <li><a href="http://www.slf4j.org">Simple Logging Facade for Java (SLF4J)</a></li>
+ <li><a href="http://jakarta.apache.org/commons/logging">Apache Commons Logging</a></li>
+ <li><a href="http://logging.apache.org/log4j/index.html">log4j</a></li>
+ <li><a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/package-summary.html">java.util.logging</a> (as of r1169918)</li>
+ <li>Configures logging through our own implementation of the SLF4J backend API</li>
+</ul>
+<h2>Initial Configuration</h2>
+<p>The <code>org.apache.sling.commons.log</code> bundle gets the initial configuration from the following <code>BundleContext</code> properties:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Property </th>
+ <th>Default </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>org.apache.sling.commons.log.level</code> </td>
+ <td><code>INFO</code> </td>
+ <td>Sets the initial logging level of the root logger. This may be any of the defined logging levels <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code> and <code>FATAL</code>. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.commons.log.file</code> </td>
+ <td>undefined </td>
+ <td>Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to <code>System.out</code>. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.commons.log.file.number</code> </td>
+ <td>5 </td>
+ <td>The number of rotated files to keep. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.commons.log.file.size</code> </td>
+ <td>'.'yyyy-MM-dd </td>
+ <td>Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section <em>Log File Rotation</em> below for full details on log file rotation. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.commons.log.pattern</code> </td>
+ <td>{0,date,dd.MM.yyyy HH:mm:ss.SSS} <em>{4}</em> [{2}]({{ refs.-2.path }}) {3} {5} </td>
+ <td>The <code>MessageFormat</code> pattern to use for formatting log messages with the root logger. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.commons.log.julenabled</code> </td>
+ <td>n/a </td>
+ <td>Enables the <code>java.util.logging</code> support. </td>
+ </tr>
+ </tbody>
+</table>
+<h2>User Configuration</h2>
+<p>User Configuration after initial configuration is provided by the Configuration Admin Service. To this avail two <code>org.osgi.services.cm.ManagedServiceFactory</code> services are registered under the PIDs <code>org.apache.sling.commons.log.LogManager.factory.writer</code> and <code>org.apache.sling.commons.log.LogManager.factory.config</code> which may receive configuration.</p>
+<h3>Logger Configuration</h3>
+<p>Loggers (or Categories) can be configured to log to specific files at specific levels using configurable patterns. To this avail factory configuration instances with factory PID <code>org.apache.sling.commons.log.LogManager.factory.config</code> may be created and configured with the Configuration Admin Service.</p>
+<p>The following properties may be set:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Property </th>
+ <th>Type </th>
+ <th>Default </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>org.apache.sling.commons.log.level</code> </td>
+ <td><code>String</code> </td>
+ <td><code>INFO</code> </td>
+ <td>Sets the logging level of the loggers. This may be any of the defined logging levels <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code> and <code>FATAL</code>. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.commons.log.file</code> </td>
+ <td><code>String</code> </td>
+ <td>undefined </td>
+ <td>Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to <code>System.out</code>. 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. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.commons.log.pattern</code> </td>
+ <td><code>String</code> </td>
+ <td>{0,date,dd.MM.yyyy HH:mm:ss.SSS} <em>{4}</em> [{2}]({{ refs.-2.path }}) {3} {5} </td>
+ <td>The <code>java.util.MessageFormat</code> pattern to use for formatting log messages with the root logger. This is a <code>java.util.MessageFormat</code> pattern supporting up to six arguments: {0} The timestamp of type <code>java.util.Date</code>, {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. </td>
+ </tr>
+ </tbody>
+</table>
+<p>| <code>org.apache.sling.commons.log.names</code> | <code>String[]</code> | -- | A list of logger names to which this configuration applies. |</p>
+<p>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.</p>
+<h3>Log Writer Configuration</h3>
+<p>Log Writer Configuration is used to setup file output and log file rotation characteristics for log writers used by the Loggers.</p>
+<p>The following properties may be set:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Property </th>
+ <th>Default </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>org.apache.sling.commons.log.file</code> </td>
+ <td>undefined </td>
+ <td>Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to <code>System.out</code>. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.commons.log.file.number</code> </td>
+ <td>5 </td>
+ <td>The number of rotated files to keep. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.commons.log.file.size</code> </td>
+ <td>'.'yyyy-MM-dd </td>
+ <td>Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section <em>Log File Rotation</em> below for full details on log file rotation. </td>
+ </tr>
+ </tbody>
+</table>
+<p>See the section <em>Log File Rotation</em> below for full details on the <code>org.apache.sling.commons.log.file.size</code> and <code>org.apache.sling.commons.log.file.number</code> properties.</p>
+<h2>Log File Rotation</h2>
+<p>Log files can grow rather quickly and fill up available disk space. To cope with this growth log files may be rotated in two ways: At specific times or when the log file reaches a configurable size. The first method is called <em>Scheduled Rotation</em> and is used by specifying a <code>SimpleDateFormat</code> pattern as the log file "size". The second method is called <em>Size Rotation</em> and is used by setting a maximum file size as the log file size.</p>
+<p>As of version 2.0.6 of the Sling Commons Log bundle, the default value for log file scheduling is <code>'.'yyyy-MM-dd</code> causing daily log rotation. Previously log rotation defaulted to a 10MB file size limit.</p>
+<h3>Scheduled Rotation</h3>
+<p>The rolling schedule is specified by setting the <code>org.apache.sling.commons.log.file.size</code> property to a <code>java.text.SimpleDateFormat</code> pattern. Literal text (such as a leading dot) to be included must be <em>enclosed</em> within a pair of single quotes. A formatted version of the date pattern is used as the suffix for the rolled file name.</p>
+<p>For example, if the log file is configured as <code>/foo/bar.log</code> and the pattern set to <code>'.'yyyy-MM-dd</code>, on 2001-02-16 at midnight, the logging file <code>/foo/bar.log</code> will be renamed to <code>/foo/bar.log.2001-02-16</code> and logging for 2001-02-17 will continue in a new <code>/foo/bar.log</code> file until it rolls over the next day.</p>
+<p>It is possible to specify monthly, weekly, half-daily, daily, hourly, or minutely rollover schedules.</p>
+<table>
+ <thead>
+ <tr>
+ <th>DatePattern </th>
+ <th>Rollover schedule </th>
+ <th>Example </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>'.'yyyy-MM</code> </td>
+ <td>Rollover at the beginning of each month </td>
+ <td>At midnight of May 31st, 2002 <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-05</code>. Logging for the month of June will be output to <code>/foo/bar.log</code> until it is also rolled over the next month. </td>
+ </tr>
+ <tr>
+ <td><code>'.'yyyy-ww</code> </td>
+ <td>Rollover at the first day of each week. The first day of the week depends on the locale. </td>
+ <td>Assuming the first day of the week is Sunday, on Saturday midnight, June 9th 2002, the file <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-23</code>. Logging for the 24th week of 2002 will be output to <code>/foo/bar.log</code> until it is rolled over the next week. </td>
+ </tr>
+ <tr>
+ <td><code>'.'yyyy-MM-dd</code> </td>
+ <td>Rollover at midnight each day.</td>
+ <td>At midnight, on March 8th, 2002, <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-03-08</code>. Logging for the 9th day of March will be output to <code>/foo/bar.log</code> until it is rolled over the next day.</td>
+ </tr>
+ <tr>
+ <td><code>'.'yyyy-MM-dd-a</code> </td>
+ <td>Rollover at midnight and midday of each day.</td>
+ <td>at noon, on March 9th, 2002, <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-03-09-AM</code>. Logging for the afternoon of the 9th will be output to <code>/foo/bar.log</code> until it is rolled over at midnight.</td>
+ </tr>
+ <tr>
+ <td><code>'.'yyyy-MM-dd-HH</code> </td>
+ <td>Rollover at the top of every hour.</td>
+ <td>At approximately 11:00.000 o'clock on March 9th, 2002, <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-03-09-10</code>. Logging for the 11th hour of the 9th of March will be output to <code>/foo/bar.log</code> until it is rolled over at the beginning of the next hour.</td>
+ </tr>
+ <tr>
+ <td><code>'.'yyyy-MM-dd-HH-mm</code> </td>
+ <td>Rollover at the beginning of every minute.</td>
+ <td>At approximately 11:23,000, on March 9th, 2001, <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2001-03-09-10-22</code>. Logging for the minute of 11:23 (9th of March) will be output to <code>/foo/bar.log</code> until it is rolled over the next minute.</td>
+ </tr>
+ </tbody>
+</table>
+<p>Do not use the colon ":" character in anywhere in the pattern option. The text before the colon is interpeted as the protocol specificaion of a URL which is probably not what you want.</p>
+<p>Note that Scheduled Rotation ignores the <code>org.apache.sling.commons.log.file.number</code> property since the old log files are not numbered but "dated".</p>
+<h3>Size Rotation</h3>
+<p>Log file rotation by size is specified by setting the <code>org.apache.sling.commons.log.file.size</code> property to a plain number or a number plus a size multiplier. The size multiplier may be any of <code>K</code>, <code>KB</code>, <code>M</code>, <code>MB</code>, <code>G</code>, or <code>GB</code> where the case is ignored and the meaning is probably obvious.</p>
+<p>When using Size Rotation, the <code>org.apache.sling.commons.log.file.number</code> defines the number of old log file generations to keep. For example to keep 5 old log files indexed by 0 through 4, set the <code>org.apache.sling.commons.log.file.number</code> to <code>5</code> (which happens to be the default).</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/pax-exam-utils.html
----------------------------------------------------------------------
diff --git a/documentation/pax-exam-utils.html b/documentation/pax-exam-utils.html
new file mode 100644
index 0000000..97c28a1
--- /dev/null
+++ b/documentation/pax-exam-utils.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Sling Pax Exam Utilities</h1></header><p>Utilities to help testing Sling components with Pax Exam are available at <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/sling-pax-util">https://svn.apache.org/repos/asf/sling/trunk/testing/sling-pax-util</a></p>
+<p>The focus is on making it easier to test Sling components against a full Sling launchpad, with minimal boilerplate code.</p>
+<p>See the <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/sling-pax-util/src/test/java/org/apache/sling/paxexam/util/SlingRepositoryTest.java">SlingRepositoryTest</a> class for an example test.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine.html b/documentation/the-sling-engine.html
new file mode 100644
index 0000000..6214130
--- /dev/null
+++ b/documentation/the-sling-engine.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>The Sling Engine</h1></header><h2>General</h2>
+<ul>
+ <li><a href="/documentation/the-sling-engine/architecture.html">Architecture</a></li>
+ <li><a href="/documentation/the-sling-engine/authentication.html">Authentication</a></li>
+ <li><a href="/documentation/the-sling-engine/service-authentication.html">{{ refs.service-authentication.headers.title }}</a></li>
+</ul>
+<h2>Request Handling</h2>
+<ul>
+ <li><a href="/documentation/the-sling-engine/dispatching-requests.html">Dispatching Requests</a></li>
+ <li><a href="/documentation/the-sling-engine/url-decomposition.html">URL decomposition</a></li>
+ <li><a href="/documentation/the-sling-engine/url-to-script-resolution.html">URL to Script Resolution</a></li>
+ <li><a href="/documentation/the-sling-engine/request-listeners.html">Request Listeners</a></li>
+ <li><a href="/documentation/the-sling-engine/filters.html">Filters</a></li>
+ <li><a href="/documentation/the-sling-engine/servlets.html">Servlets and Scripts</a></li>
+ <li><a href="/documentation/the-sling-engine/errorhandling.html">Errorhandling</a></li>
+ <li><a href="/documentation/the-sling-engine/request-parameters.html">Request Parameters</a></li>
+</ul>
+<h2>Resources</h2>
+<ul>
+ <li><a href="/documentation/the-sling-engine/resources.html">Resources</a></li>
+ <li><a href="/documentation/the-sling-engine/sling-api-crud-support.html">Sling API CRUD Support</a></li>
+ <li><a href="/documentation/the-sling-engine/wrap-or-decorate-resources.html">Wrap or Decorate Resources</a></li>
+ <li><a href="/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a></li>
+</ul>
+<h2>Misc</h2>
+<ul>
+ <li><a href="/documentation/the-sling-engine/adapters.html">Adapters</a></li>
+ <li><a href="/documentation/the-sling-engine/featureflags.html">{{ refs.featureflags.headers.title }}</a></li>
+</ul></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/adapters.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/adapters.html b/documentation/the-sling-engine/adapters.html
new file mode 100644
index 0000000..7656516
--- /dev/null
+++ b/documentation/the-sling-engine/adapters.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Adapters</h1></header><p>[TOC]</p>
+<p>The <code>Resource</code> and <code>ResourceResolver</code> interfaces are defined with a method <code>adaptTo</code>, which adapts the object to other classes. Using this mechanism the JCR session of the resource resolver calling the <code>adaptTo</code> method with the <code>javax.jcr.Session</code> class object. Likewise the JCR node on which a resource is based can be retrieved by calling the <code>Resource.adaptTo</code> method with the <code>javax.jcr.Node</code> class object.</p>
+<p>To use resources as scripts, the <code>Resource.adaptTo</code> method must support being called with the <code>org.apache.sling.api.script.SlingScript</code> class object. But of course, we do not want to integrate the script manager with the resource resolver. To enable adapting objects to classes which are not foreseen by the original implementation, a factory mechanism is used. This way, the script manager can provide an adapter factory to adapt <code>Resource</code> to <code>SlingScript</code> objects.</p>
+<h1>Adaptable</h1>
+<p>The <code>Adaptable</code> interface defines the API to be implemented by a class providing adaptability to another class. The single method defined by this interface is</p>
+<p>/** * Adapts the adaptable to another type. * <p> * Please not that it is explicitly left as an implementation detail whether * each call to this method with the same <code>type</code> yields the same * object or a new object on each call. * <p> * Implementations of this method should document their adapted types as * well as their behaviour with respect to returning newly created or not * instance on each call. * * @param <AdapterType> The generic type to which this resource is adapted * to * @param type The Class object of the target type, such as * <code>javax.jcr.Node.class</code> or * <code>java.io.File.class</code> * @return The adapter target or <code>null</code> if the resource cannot * adapt to the requested type */ <AdapterType> AdapterType adaptTo(Class<AdapterType> type);</p>
+<p>This method is called to get a view of the same object in terms of another class. Examples of implementations of this method are the Sling <code>ResourceResolver</code> implementation providing adapting to a JCR session and the Sling JCR based <code>Resource</code> implementation providing adapting to a JCR node.</p>
+<h1>Listing Adaptation Possibilities</h1>
+<p>The Web Console Plugin at <code>/system/console/adapters</code> and at <code>/system/console/status-adapters</code> can be used to list all existing adaptables in the system with their according adapter classes.</p>
+<p>The web console plugin evaluates metadata being provided by any <code>AdapterFactory</code> services as well as metadata being provided through the file <code>SLING-INF/adapters.json</code></p>
+<h1>Implementing Adaptable</h1>
+<p>Each adaptable should derive from <code>SlingAdaptable</code> to automatically profit from all according <code>AdapterFactories</code> registered in the system. In case the <code>adaptTo(...)</code> method is being overwritten an according <code>SLING-INF/adapters.json</code> should be included in the providing bundle listing all adaptation possibilities. While this file is not strictly necessary for the actual adaptation to work, it provides useful information to the Web Console plugin. Otherwise developers will not know which adaptations are supported. The format of this JSON file looks like this (<a href="https://issues.apache.org/jira/browse/SLING-2295">SLING-2295</a>):</p>
+<p>{ <fully qualified class name of adaptable> : { <condition> : <fully qualified class name of adapter, may be a JSON array> } }</p>
+<p>For example</p>
+<p>{ "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" ], "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" } }</p>
+<p>Instead of manually creating that JSON file, the annotations from the module <a href="https://svn.apache.org/viewvc/sling/trunk/tooling/maven/adapter-annotations/">adapter-annotations</a> can be used together with the goal <code>generate-adapter-metadata</code> from the <a href="http://sling.apache.org/components/maven-sling-plugin/generate-adapter-metadata-mojo.html">Maven Sling Plugin</a> to generate it automatically (<a href="https://issues.apache.org/jira/browse/SLING-2313">SLING-2313</a>).</p>
+<h1>Extending Adapters</h1>
+<p>Sometimes an <code>Adaptable</code> implementation cannot foresee future uses and requirements. To cope with such extensibility requirements two interfaces and an abstract base class are defined:</p>
+<ul>
+ <li><code>AdapterManager</code></li>
+ <li><code>AdapterFactory</code></li>
+ <li><code>SlingAdaptable</code></li>
+</ul>
+<h2>AdapterFactory</h2>
+<p>The <code>AdapterFactory</code> interface defines the service interface and API for factories supporting extensible adapters for <code>SlingAdaptable</code> objects. The interface has a single method:</p>
+<p>/** * Adapt the given object to the adaptable type. The adaptable object is * guaranteed to be an instance of one of the classes listed in the * {@link #ADAPTABLE_CLASSES} services registration property. The type * parameter is one of the classes listed in the {@link #ADAPTER_CLASSES} * service registration properties. * <p> * This method may return <code>null</code> if the adaptable object cannot * be adapted to the adapter (target) type for any reason. In this case, the * implementation should log a message to the log facility noting the cause * for not being able to adapt. * <p> * Note that the <code>adaptable</code> object is not required to implement * the <code>Adaptable</code> interface, though most of the time this method * is called by means of calling the {@link Adaptable#adaptTo(Class)} * method. * * @param <AdapterType> The generic type of the adapter (target) type. * @param adaptable The object to adapt to the adapter type. * @param type The type to which the object
is to be adapted. * @return The adapted object or <code>null</code> if this factory instance * cannot adapt the object. */ <AdapterType> AdapterType getAdapter(Object adaptable, Class<AdapterType> type);</p>
+<p>Implementations of this interface are registered as OSGi services providing two lists: The list of classes which may be adapted (property named <code>adaptables</code>) and the list of classes to which the adapted class may be adapted (property named <code>adapters</code>). A good example of an Class implementing <code>AdapterFactory</code> is the <code>SlingScriptAdapterFactory</code>. In addition a property named <code>adapter.condition</code> can be provided which is supposed to contain a string value explaining under which circumstances the adaption will work (if there are any restrictions). This is evaluated by the Web Console Plugin.</p>
+<p><code>AdapterFactory</code> services are gathered by a <code>AdapterManager</code> implementation for use by consumers. Consumers should not care for <code>AdapterFactory</code> services.</p>
+<h2>AdapterManager</h2>
+<p>The <code>AdapterManager</code> is defines the service interface for the generalized and extensible use of <code>AdapterFactory</code> services. Thus the adapter manager may be retrieved from the service registry to try to adapt whatever object that needs to be adapted - provided appropriate adapters exist.</p>
+<p>The <code>AdapterManager</code> interface is defined as follows:</p>
+<p>/** * Returns an adapter object of the requested <code>AdapterType</code> for * the given <code>adaptable</code> object. * <p> * The <code>adaptable</code> object may be any non-<code>null</code> object * and is not required to implement the <code>Adaptable</code> interface. * * @param <AdapterType> The generic type of the adapter (target) type. * @param adaptable The object to adapt to the adapter type. * @param type The type to which the object is to be adapted. * @return The adapted object or <code>null</code> if no factory exists to * adapt the <code>adaptable</code> to the <code>AdapterType</code> * or if the <code>adaptable</code> cannot be adapted for any other * reason. */ <AdapterType> AdapterType getAdapter(Object adaptable, Class<AdapterType> type);</p>
+<p>Any object can theoretically be adapted to any class even if it does not implement the <code>Adaptable</code> interface, if an <code>AdapterFactory</code> service delivers a <code>getAdapter()</code> method which adapts an object to another one. To check if there's any existing <code>AdapterFactory</code> which can adapt a given object to another one the <code>AdapterManager</code> service with its <code>getAdapter()</code> method does the job. So the <code>Adaptable</code> interface merely is an indicator that the object provides built-in support for being adapted.</p>
+<h2>SlingAdaptable</h2>
+<p>The <code>SlingAdaptable</code> class is an implementation of the <code>Adaptable</code> interface which provides built-in support to call the <code>AdapterManager</code> to provide an adapter from the <code>Adaptable</code> object to the requested class.</p>
+<p>An example of extending the <code>SlingAdaptable</code> class will be the Sling JCR based <code>Resource</code> implementation. This way, such a resource may be adapted to a <code>SlingScript</code> by means of an appropriately programmed <code>AdapterFactory</code> (see below).</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/architecture.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/architecture.html b/documentation/the-sling-engine/architecture.html
new file mode 100644
index 0000000..01a4169
--- /dev/null
+++ b/documentation/the-sling-engine/architecture.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Architecture</h1></header><p>The following is a short list of high-lights of Sling:</p>
+<ul>
+ <li><strong><a href="#osgi">OSGi</a></strong> — The Sling application is built as a series of OSGi bundles and makes heavy use of a number of OSGi core and compendium services.</li>
+ <li><strong><a href="#sling-api">Sling API</a></strong> — 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.</li>
+ <li><strong><a href="#request-processing">Request Processing</a></strong> — 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.</li>
+ <li><strong><a href="#resources">Resources</a></strong> — The central mantra of Sling is the <em>Resource</em>, 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.</li>
+ <li><strong><a href="#servlets-and-scripts">Servlets and Scripts</a></strong> — Servlets and Scripts are handled uniformly in that they are represented as resources themselves and are accessible by a resource path.</li>
+ <li><strong><a href="#launchpad">Launchpad</a></strong> — 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.</li>
+</ul>
+<p>The following sections elaborate on each of these highlights.</p>
+<h2>OSGi</h2>
+<p><a href="http://www.osgi.org">OSGi</a> is a consortium that has developed a specification to build modular and extensible applications. This offers <a href="http://www.osgi.org/About/WhyOSGi">various benefits</a>. We deal mainly with two parts of the specifications: The Core Specification, which defines the OSGi Framework and Core Services, and the Compendium Services Specification, which defines a host of services that extend the functionality of the OSGi Framework.</p>
+<h3>OSGi Framework</h3>
+<p>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:</p>
+<ul>
+ <li><strong>Module</strong> — Defines how a module, or a <em>Bundle</em> 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 <code>Export-Package</code> and what a bundle requires to be operative <code>Import-Package</code> and <code>Require-Bundle</code>.</li>
+ <li><strong>Lifecycle</strong> — The lifecycle layer defines the states a bundle may be in and describes the state changes. By providing a class, which implements the <code>BundleActivator</code> interface and which is named in the <code>Bundle-Activator</code> manifest header, a bundle may hook into the lifecycle process when the bundle is started and stopped.</li>
+ <li><strong>Services</strong> — 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.</li>
+</ul>
+<h3>Compendium Services</h3>
+<p>Based on the OSGi Framework specification, the Compendium Services specification defines a (growing) number of extension services, which may be used by applications for various tasks. Of these Compendium Services, Sling is using just a small number:</p>
+<ul>
+ <li><strong>Log Service</strong> — 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.</li>
+ <li><strong>Http Service</strong> — Sling leverages the OSGi Http Service to hook into a servlet container to provide the Web Application Framework mechanism.</li>
+ <li><strong>Configuration Admin Service</strong> — 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.</li>
+ <li><strong>Metatype Service</strong> — 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.</li>
+ <li><strong>Event Admin Service</strong> — Sling uses the OSGi EventAdmin service to dispatch events when scheduling tasks.</li>
+ <li><strong>Declarative Services</strong> — 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.</li>
+</ul>
+<h2>Sling API</h2>
+<p>The Sling API is an extension to the Servlet API which provides more functionality to interact with the Sling framework and also to extend Sling itself and to implement Sling applications.</p>
+<p>See the [Sling API]({{ refs.sling-api.path }}) page for more information.</p>
+<h2>Request Processing</h2>
+<p>Traditional Web Application framework emply more or less elaborate methods to select a Servlet or Controller based on the request URL, which in turn tries to load some data (usually from a database) to act upon and finally to render the result somehow.</p>
+<p>Sling turns this processing around in that it places the data to act upon at the center and consequently uses the request URL to first resolve the data to process. This data is internally represented as an instance of the <code>Resource</code> interface. Based on this resource as well as the request method and more properties of the request URL a script or servlet is then selected to handle the request.</p>
+<p>See the <a href="/documentation/the-sling-engine/servlets.html">Servlets</a> page for more information.</p>
+<h2>Resources</h2>
+<p>The Resource is one of the central parts of Sling. Extending from JCR's <em>Everything is Content</em>, Sling assumes <em>Everthing is a Resource</em>. Thus Sling is maintaining a virtual tree of resources, which is a merger of the actual contents in the JCR Repository and resources provided by so called resource providers.</p>
+<p>Each resource has a path by which it is addressed in the resource tree, a resource type and some resource metadata (such as file size, last modification time). It is important to understand, that a <code>Resource</code> instance actually is only a handle to the actual data. By virtue of the <code>adaptTo(Class<Type>)</code> method, a resource may be coerced into another data type, which may then be used while processing the request. Examples of data types are <code>javax.jcr.Node</code> and <code>java.io.InputStream</code>.</p>
+<p>See the <a href="/documentation/the-sling-engine/resources.html">Resources</a> page for more information.</p>
+<h2>Servlets and Scripts</h2>
+<p>Scripts are usually provided as content in a JCR repository. But since Sling is using a resource tree, a script actually is represented as a Resource and may be provided from within a Bundle (by virtue of the bundle resource provider) or even from the platform file system (by virtue of the file system resource provider).</p>
+<p>Accessing scripts in the resource tree, allows for a very easy to understand mapping from resource type to some script path.</p>
+<p>Having found the script resource, we still need access to the appropriate script language implementation to evaluate the script. To this avail, Sling is making use of the <code>Resource.adaptTo(Class<Type>)</code> method: If a script language implementation is available for the extension of the script name an adaptor for the script resource can be found, which handles the evaluation of the script.</p>
+<p>Besides scripting languages, such as ECMAScript, Groovy, JSP, Sling also supports regular servlets. To be able to use servlets for request processing, such servlets must be registered as OSGi services for the <code>javax.servlet.Servlet</code> interface and provide a number of service registration properties, which are used to use the servlets. In fact servlets thus registered as OSGi services are mapped into the resource tree by means of a servlet resource provider. This resource provider mapps the servlets into the resource tree using the service registration properties to build one or more resource paths for the servlet.</p>
+<p>As a result of mapping servlets into the resource tree and the possibility to adapt resource to an adaptor data type, scripts and servlets may be handled completely transparently: The servlet resolver just looks for a resource matching the resource type and adapts the resource found to <code>javax.jcr.Servlet</code>. If the resource happens to be provided by a servlet resource provider, the adapter is of course the servlet itself. If the resource happens to be a script, the adapter is a servlet facade which internally calls the script language implementation to evaluate the script.</p>
+<p>See the [Servlet Resolution]({{ refs.servlet-resolution.path }}) page for more information.</p>
+<h2>Launchpad</h2>
+<p>Sling may be launched as a standalone application using the Sling Application or as a Web Application running inside any Servlet API 2.4 or newer Servlet Container.</p>
+<p>The Sling Application is a standalone Java Application which is really small: Just the main class and some glue classes. The OSGi framework as well as the OSGi API libraries are packaged as a JAR file, which is loaded through a custom classloader. This enables to update the framework and/or OSGi API libraries from within Sling by updating the system bundle.</p>
+<p>The Sling Servlet is equally small as the Sling Application. It uses the Felix <code>HttpService</code> bridge as the glue between the servlet container and the OSGi framework.</p>
+<p>As we have seen, Sling may be launched as a standalone Java Application or as a Web Application inside any compliant Servlet Container. To hide the differences of the launching mechanism, Sling internally registers a Servlet with an OSGi <code>HttpService</code>. Regardless of how Sling is launched, the Felix implementation of the OSGi <code>HttpService</code> specification is used. When Sling is launched as a standalone Java Application, Felix HttpService uses an embedded version of the Jetty servlet container. When Sling is launched as a Web Application, the Felix HttpService Bridge is used.</p>
+<p>Optionally, PAX Web's implementation of HttpService can be used when Sling is launched as a standalone Java Application. See the <a href="/documentation/development/maven-launchpad-plugin.html">Maven Launchpad Plugin</a> page for information on how to do this.</p>
+<p>See <a href="/documentation/the-sling-engine/the-sling-launchpad.html">The Sling Launchpad</a> for more information.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/authentication.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/authentication.html b/documentation/the-sling-engine/authentication.html
new file mode 100644
index 0000000..73007f3
--- /dev/null
+++ b/documentation/the-sling-engine/authentication.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Authentication</h1></header><p>Excerpt: How requests are authenticated.</p>
+<p>This section describes the framework provided by Sling to authenticate HTTP requests.</p>
+<p>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 <code>SlingMainServlet</code> class in the Sling Engine bundle – with an OSGi <code>HttpService</code>. This registration is accompanyied with an implementation instance of the OSGi <code>HttpContext</code> interface, which defines a method to authenticate requests: <code>handleSecurity</code>.</p>
+<p>This method is called by the OSGi HTTP Service implementation after the servlet has been selected to handle the request but before actually calling the servlet's <code>service</code> method.</p>
+<a href="authentication.png" style="float:left;padding-right:5%">
+<img src="authentication.png" title="Authentication Flow" alt="Authentication Flow" />
+</a>
+<ol>
+ <li>First the OSGi HTTP Service implementation is analyzing the request URL to find a match for a servlet or resource registered with the HTTP Service.</li>
+ <li>Now the HTTP Service implementation has to call the <code>handleSecurity</code> method of the <code>HttpContext</code> object with which the servlet or resource has been registered. This method returns <code>true</code> if the request should be serviced. If this method returns <code>false</code> the HTTP Service implementation terminates the request sending back any response which has been prepared by the <code>handleSecurity</code> method. Note, that the <code>handleSecurity</code> method must prepare the failure response sent to the client, the HTTP Service adds nothing here. If the <code>handleSecurity</code> method is successful, it must add two (or three) request attributes described below.</li>
+ <li>When the <code>handleSecurity</code> method returns <code>true</code> the HTTP Service either calls the <code>Servlet.service</code> method or sends back the requested resource depending on whether a servlet or a resource has been selected in the first step.</li>
+</ol>
+<p>The important thing to note here is, that at the time the <code>handleSecurity</code> method is called, the <code>SlingMainServlet</code> is not yet in control of the request. So any functionality added by the <code>SlingMainServlet</code>, notably the <code>SlingHttpServletRequest</code> and <code>SlingHttpServletResponse</code> objects are not available to the implementation of the <code>handleSecurity</code> method.</p>
+<p>The following pages describe the full details of request authentication in Sling in full detail:</p>
+<ul>
+ <li><a href="/documentation/the-sling-engine/authentication/authentication-tasks.html">Tasks</a>: {{ refs.authentication-tasks.headers.excerpt }}</li>
+ <li><a href="/documentation/the-sling-engine/authentication/authentication-actors.html">Actors</a>: {{ refs.authentication-actors.headers.excerpt }}</li>
+ <li><a href="/documentation/the-sling-engine/authentication/authentication-framework.html">Framework</a>: {{ refs.authentication-framework.headers.excerpt }}</li>
+ <li><a href="/documentation/the-sling-engine/authentication/authentication-authenticationhandler.html">AuthenticationHandler</a>: {{ refs.authentication-authenticationhandler.headers.excerpt }}</li>
+</ul></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
[20/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/sling-health-check-tool.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/sling-health-check-tool.md b/content/documentation/bundles/sling-health-check-tool.md
deleted file mode 100644
index 710e937..0000000
--- a/content/documentation/bundles/sling-health-check-tool.md
+++ /dev/null
@@ -1,224 +0,0 @@
-title=Sling Health Check Tools
-type=page
-status=published
-~~~~~~
-
-Based on simple `HealthCheck` OSGi services, the Sling Health Check Tools ("hc" in short form) are used to
-check the health of live Sling systems, based on inputs like JMX MBean attribute values, OSGi framework
-information, Sling requests status, etc.
-
-Health checks are easily extensible either by configuring the supplied default `HealthCheck` services, or
-by implementing your own `HealthCheck` services to cater for project specific requirements.
-
-However for simple setups, the out of the box health checks are often sufficient. [Executing Health Checks](#executing-health-checks)
-is a good starting point to run existing checks and to get familiar with how health checks work.
-
-See also:
-
-* Source code at [http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck](http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck)
-* adaptTo slides about Health Checks: [Introduction](http://www.slideshare.net/bdelacretaz/slinghc-bdelacretazadaptto2013) and [Health Check Executor](https://adapt.to/content/dam/adaptto/production/presentations/2014/adaptTo2014-Sling-Health-Checks-New-And-Noteworthy-Georg-Henzler.pdf/_jcr_content/renditions/original.media_file.download_attachment.file/adaptTo2014-Sling-Health-Checks-New-And-Noteworthy-Georg-Henzler.pdf)
-
-## Use cases
-Generally health checks have two high level use cases:
-
-* Operations teams checking sling instances for their internal state manually
-* Load balancers can query the health of a sling instance and decide to take it out or back into the list of used backends automatically
-
-The strength of Health Checks are to surface internal Sling state for external use:
-
-* Verify that performance counters are in range
-* Run smoke tests at system startup
-* Check that all OSGi bundles are up and running
-* Check that demo content has been removed from a production system
-* Check that demo accounts are disabled
-* Ping external systems and raise alarms if they are down
-
-The health check subsystem uses tags to select which health checks to execute so you can for example execute just the _performance_ or _security_ health
-checks once they are configured with the corresponding tags.
-
-The out of the box health check services also allow for using them as JMX aggregators and processors, which take JMX
-attribute values as input and make the results accessible via JMX MBeans.
-
-## What's a `HealthCheck` ?
-
-A `HealthCheck` is just an OSGi service that returns a `Result`.
-
-public interface HealthCheck {
-
-/** Execute this health check and return a {@link Result}
-* This is meant to execute quickly, access to external
-* systems, for example, should be managed asynchronously.
-*/
-public Result execute();
-}
-
-Where `Result` is a simple immutable class that provides a `Status` (OK, WARN, CRITICAL etc.) and one or more log-like messages that
-can provide more info about what, if anything, went wrong.
-
-public class Result implements Iterable <ResultLog.Entry> {
-
-public boolean isOk() {
-return getStatus().equals(Status.OK);
-}
-
-public Status getStatus() {
-return resultLog.getAggregateStatus();
-}
-
-@Override
-public Iterator<ResultLog.Entry> iterator() {
-return resultLog.iterator();
-}
-
-... details omitted
-}
-
-### SlingHealthCheck annotation
-The `SlingHealthCheck` annotation makes it easier to specify the required `HealthCheck` service properties.
-
-Here's an example from the `samples` module - see the `annotations` module for more details.
-
-@SlingHealthCheck(
-name="Annotated Health Check Sample",
-mbeanName="annotatedHC",
-description="Sample Health Check defined by a java annotation",
-tags={"sample","annotation"})
-
-public class AnnotatedHealthCheckSample implements HealthCheck {
-
-@Override
-public Result execute() {
-...health check code
-}
-}
-
-## Executing Health Checks
-
-Health Checks can be executed via a [webconsole plugin](#webconsole-plugin), the [health check servlet](#health-check-servlet) or via [JMX](#jmx-access-to-health-checks). `HealthCheck` services can be selected for execution based on their `hc.tags` multi-value service property.
-
-The `HealthCheckFilter` utility accepts positive and negative tag parameters, so that `-security,sling`
-selects all `HealthCheck` having the `sling` tag but not the `security` tag, for example.
-
-For advanced use cases it is also possible to use the API directly by using the interface `org.apache.sling.hc.api.execution.HealthCheckExecutor`.
-
-## Health Check bundles
-The Health Check subsystem consists of the following bundles:
-
-* The only required bundles are `org.apache.sling.hc.api` which provides the API and `org.apache.sling.hc.core` which provides some utility classes and some generally useful `HealthCheck` services (e.g. the health check executor)
-* `org.apache.sling.hc.support` provides more Sling-specific `HealthCheck` services.
-* `org.apache.sling.hc.webconsole` provides the Webconsole plugin described below.
-* `org.apache.sling.junit.healthcheck` provides a `HealthCheck` service that executes JUnit tests in the server-side OSGi context.
-* `org.apache.sling.hc.samples` provides sample OSGi configurations and `HealthCheck` services. The sample configurations are provided as Sling content, so the Sling Installer is required to activate them.
-* `org.apache.sling.hc.junit.bridge` makes selected Health Checks available as server-side JUnit tests. See below for more info.
-
-## Out-of-the-box `HealthCheck` services
-
-The following default `HealthCheck` services are provided by the `org.apache.sling.hc.core` bundle:
-
-The `org.apache.sling.hc.samples` bundle provides OSGi configurations that demonstrate them.
-
-* `JmxAttributeHealthCheck` checks the value of a single JMX attribute and supports ranges like _between 12 and 42_.
-* `ScriptableHealthCheck` evaluates an expression written in any scripting language that Sling supports, and provides bindings to access JMX attributes.
-* `CompositeHealthCheck` executes a set of `HealthCheck` selected by tags, useful for creating higher-level checks.
-
-A few more Sling-specific ones are provided by the `org.apache.sling.hc.support` bundle:
-
-* `SlingRequestStatusHealthCheck` checks the HTTP status of Sling requests.
-* `DefaultLoginsHealthCheck` can be used to verify that the default Sling logins fail.
-* `ThreadUsageHealthCheck` can be used to monitor for deadlocks using JRE ThreadMXBean (see [SLING-6698](https://issues.apache.org/jira/browse/SLING-6698) )
-
-A bridge to server-side OSGi-aware JUnit tests is provided by the `JUnitHealthCheck`, from
-the `org.apache.sling.junit.healthcheck` bundle.
-
-The `org.apache.sling.hc.samples` bundle provides an example `OsgiScriptBindingsProvider` for the default `ScriptableHealthCheck`,
-which provides OSGi-related information to health check script expressions.
-
-## Configuring Health Checks
-`HealthCheck` services are created via OSGi configurations. Generic health check service properties are interpreted by the health check executor service. Custom health check service properties can be used by the health check implementation itself to configure its behaviour.
-
-The following generic Health Check properties may be used for all checks:
-
-Property | Type | Description
------------ | -------- | ------------
-hc.name | String | The name of the health check as shown in UI
-hc.tags | String[] | List of tags: Both Felix Console Plugin and Health Check servlet support selecting relevant checks by providing a list of tags
-hc.mbean.name | String | Makes the HC result available via given MBean name. If not provided no MBean is created for that `HealthCheck`
-hc.async.cronExpression | String | Used to schedule the execution of a `HealthCheck` at regular intervals, using a cron expression as specified by the [Sling Scheduler](/documentation/bundles/scheduler-service-commons-scheduler.html) module.
-hc.resultCacheTtlInMs | Long | Overrides the global default TTL as configured in health check executor for health check responses (since v1.2.6 of core)
-
-All service properties are optional.
-
-As an example, here's a `ScriptableHealthCheck` configuration provided by the `org.apache.sling.hc.samples` bundle:
-
-Factory PID = org.apache.sling.hc.ScriptableHealthCheck
-"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"
-
-The service properties starting with the `hc.` prefix in this example should be provided by all `HealthCheck` services.
-
-## Configuring the Health Check Executor
-The health check executor can **optionally** be configured via service PID `org.apache.sling.hc.core.impl.executor.HealthCheckExecutorImpl`:
-
-Property | Type | Default | Description
------------ | -------- | ------ | ------------
-timeoutInMs | Long | 2000ms | Timeout in ms until a check is marked as timed out
-longRunningFutureThresholdForCriticalMs | Long | 300000ms = 5min | Threshold in ms until a check is marked as 'exceedingly' timed out and will marked CRITICAL instead of WARN only
-resultCacheTtlInMs | Long | 2000ms | Result Cache time to live - results will be cached for the given time
-
-## Webconsole plugin
-If the `org.apache.sling.hc.webconsole` bundle is active, a webconsole plugin
-at `/system/console/healthcheck` allows for executing health checks, optionally selected
-based on their tags (positive and negative selection, see the `HealthCheckFilter` mention above).
-
-The DEBUG logs of health checks can optionally be displayed, and an option allows for showing only health checks that have a non-OK status.
-
-The screenshot below shows an example, as of svn revision 1513462.
-
-![Health Check Webconsole Plugin](sling-hc-plugin.jpg)
-
-## JMX access to health checks
-If the `org.apache.sling.hc.jmx` bundle is active, a JMX MBean is created for each `HealthCheck` which has the
-service property `hc.mbean.name` service property set. All health check MBeans are registered in the
-domain `org.apache.sling.healthcheck` with a type of `HealthCheck`.
-
-The MBean gives access to the `Result` and the log, as shown on the screenshot below.
-
-See the example configurations of the `org.apache.sling.hc.samples` for more details.
-
-![JConsole showing Sling Health Check MBeans](jconsole-hc.jpg)
-
-## Health Check Servlet
-Starting with version 1.2.4 of the `org.apache.sling.hc.core` bundle, a flexible Health Checks execution servlet is available. It provides
-similar features to the Web Console plugin described above, with output in HTML, JSON (plain or jsonp) and TXT (concise or verbose) formats (see HTML format rendering page for more documentation).
-
-The Health Checks Servlet is disabled by default, to enable it create an OSGi configuration like
-
-PID = org.apache.sling.hc.core.impl.servlet.HealthCheckExecutorServlet
-servletPath = /system/health
-
-which specifies the servlet's base path. That URL then returns an HTML page, by default with the results of all active health checks and
-with instructions at the end of the page about URL parameters which can be used to select specific Health Checks and control their execution and output format.
-
-Note that by design **the Health Checks Servlet doesn't do any access control by itself** to ensure it can detect unhealthy states of the authentication itself. Make sure the configured path is only accessible to relevant infrastructure and operations people. Usually all `/system/*` paths are only accessible from a local network and not routed to the Internet.
-
-## 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.
-
-It requires the `org.apache.sling.junit.core bundle` which provides the server-side JUnit tests infrastructure.
-
-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](/documentation/development/sling-testing-tools.html)
-remote testing utilities, and also as plain Health Checks for monitoring or troubleshooting Sling instances.
-
-To use this module, configure sets of tags at `/system/console/configMgr/org.apache.sling.hc.junitbridge.HealthCheckTestsProvider`
-using the standard `includeThisTag,-omitThatTag` syntax, and JUnit tests will be available at /system/sling/junit/HealthChecks.html
-to run the corresponding Health Checks.
-
-To run the Health Check tests at build time, see the [testing/samples/integration-tests](http://svn.apache.org/repos/asf/sling/trunk/testing/samples/integration-tests)
-sample module.
-
-
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/sling-main-servlet-config.png
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/sling-main-servlet-config.png b/content/documentation/bundles/sling-main-servlet-config.png
deleted file mode 100644
index cf667d5..0000000
Binary files a/content/documentation/bundles/sling-main-servlet-config.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/sling-oak-restrictions.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/sling-oak-restrictions.md b/content/documentation/bundles/sling-oak-restrictions.md
deleted file mode 100644
index 13f6bd7..0000000
--- a/content/documentation/bundles/sling-oak-restrictions.md
+++ /dev/null
@@ -1,103 +0,0 @@
-title=Sling Oak Restrictions
-type=page
-status=published
-~~~~~~
-[TOC]
-
-
-## Introduction
-Oak introduced plugability of restrictions as described in [Oak Restriction Management](https://jackrabbit.apache.org/oak/docs/security/authorization/restriction.html#Pluggability). The bundle sling-oak-restrictions provides additional restrictions that generally make sense for sling applications. Currently sling restrictions for exact resource type match and resource type match including all descendants are supplied.
-
-**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.
-
-The following example allows `myAuthorizable` to write to all nodes that have either resource type `myproj/comp1` or `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]
-
-
-Assuming the following structure
-
-- /content/myprj
-+ sling:resourceType (String) = "myproj/siteroot"
-- mynode
-+ sling:resourceType (String) = "myproj/comp1"
-- mysubnode
-+ sling:resourceType (String) = "myproj/comp3"
-
-
-the rule from above will match `/content/myprj/mynode` and not `/content/myprj` (parent) nor `/content/myprj/mynode/mysubnode` (child).
-
-Naturally (as with any oak restrictions), the rule is limited to its base path. In case the node `/content/myprj/othernode` is of resource type `myproj/comp1`, it will still not match.
-
-## Restriction sling:resourceTypesWithDescendants
-This restriction matches against resource types in the same way as [sling:resourceTypes](#restriction-slingresourcetypes), except that it will also match all descendants of a matched node.
-
-The following example allows `myAuthorizable` to write to all nodes that have either resource type `myproj/comp1` or `myproj/comp2` **or are a child of a node, that has one of these resource types**:
-
-- /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]
-
-
-Assuming the structure example as mentioned in [sling:resourceTypes](#restriction-slingresourcetypes), the rule from above will match `/content/myprj/mynode` and `/content/myprj/mynode/mysubnode` (and any other subnodes of `/content/myprj/mynode` with arbitrary resource types), but not `/content/myprj`.
-
-## Advanced Path Matching
-Both [sling:resourceTypes](#restriction-slingresourcetypes) and [sling:resourceTypesWithDescendants](#restriction-slingresourcetypeswithdescendants) 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`.
-
-The following example allows `myAuthorizable` to write to all nodes that have a subnode `jcr:content` with resource type `myproj/comp1` or `myproj/comp2` including their descendants:
-
-- /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]
-
-Assuming the following structure
-
-- /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/mynode1` (because of the `@jcr:content` part of `myproj/comp1@jcr:content`)
-* `/content/myprj/mynode1/jcr:content` (it will check for `/content/myprj/mynode1/jcr:content/jcr:content` that does not exist, but since the parent `/content/myprj/mynode1` is already a match this matches because of `sling:resourceTypesWithDescendants`)
-* `/content/myprj/mynode1/contentsubnode1` (because of `sling:resourceTypesWithDescendants`)
-* `/content/myprj/mynode1/contentsubnode1` (because of `sling:resourceTypesWithDescendants`)
-
-and not match
-
-* `/content/myprj`
-* `/content/myprj/mynode2`
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/sling-pipes.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/sling-pipes.md b/content/documentation/bundles/sling-pipes.md
deleted file mode 100644
index a19d19c..0000000
--- a/content/documentation/bundles/sling-pipes.md
+++ /dev/null
@@ -1,363 +0,0 @@
-title=Sling Pipes
-type=page
-status=published
-~~~~~~
-
-tool for doing extract - transform - load operations through a resource tree configuration.
-
-often one-shot data transformations need sample code to be written & executed. This tiny tool set intends to provide ability to do such transformations with proven & reusable blocks called pipes, streaming resources from one to the other.
-
-## What is a pipe
-
-getOutputBinding
-^
-|
-getInput +---+---+ getOutput
-| |
-+----> Pipe +---->
-| |
-+-------+
-
-A sling pipe is essentially a sling resource stream:
-
-- it provides an output as a sling resource iterator
-- it gets its input either from a configured path, either, if its chained (see container pipes below), from another pipe's output
-- each pipe can have additional dynamic inputs using other's bindings, and outputing its own bindings
-
-At this moment, there are 3 types of pipes to consider:
-
-- "reader" pipes, that will just output a set of resource depending on the input
-- "writer" pipes, that write to the repository, depending on configuration and output
-- "container" pipes, that contains pipes, and whose job is to chain their execution : input is the input of their first pipe,
-output is the output of the last pipe it contains.
-
-A `Plumber` osgi service is provided to help getting & executing pipes.
-
-## Registered Pipes
-a pipe configuration is a jcr node, with:
-
-- `sling:resourceType` property, which must be a pipe type registered by the plumber
-- `name` property, 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.
-- `path` property, 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.
-- `expr` property, expression through which the pipe will execute (depending on the type)
-- `additionalBinding` is a node you can add to set "global" bindings (property=value) in pipe execution
-- `additionalScripts` is a multi value property to declare scripts that can be reused in expressions
-- `conf` optional child node that contains addition configuration of the pipe (depending on the type)
-
-### readers
-
-#### Base pipe
-rather dummy pipe, outputs what is in input (so what is configured in path). Handy for doing some test mostly, and giving basic functionalities to others that inherit from it
-
-- `sling:resourceType` is `slingPipes/base`
-
-#### SlingQuery Pipe
-executes $(getInput()).children(expression)
-
-- `sling:resourceType` is `slingPipes/slingQuery`
-- `expr` mandatory property, contains slingQuery expression through which getInput()'s children will be computed to getOutput()
-
-#### JsonPipe
-feeds bindings with remote json
-
-- `sling:resourceType` is `slingPipes/json`
-- `expr` mandatory property contains url that will be called, the json be sent to the output bindings, getOutput = getInput.
-An empty url or a failing url will block the pipe at that given place.
-
-#### MultiPropertyPipe
-iterates through values of input multi value property and write them to bindings
-
-- `sling:resourceType` is `slingPipes/multiProperty`
-- `path` should be the path of a mv property
-
-#### XPathPipe
-retrieve resources resulting of an xpath query
-
-- `sling:resourceType` is `slingPipes/xpath`
-- `expr` should be a valid xpath query
-
-### JsonPipe
-feeds bindings with remote json
-
-- `sling:resourceType` is `slingPipes/json`
-- `expr` mandatory property contains url that will be called, the json be sent to the output bindings, getOutput = getInput.
-An empty url or a failing url will block the pipe at that given place.
-
-#### AuthorizablePipe
-retrieve authorizable resource corresponding to the id passed in expression, or if not found (or void expression),
-from the input path, output the found authorizable's resource
-
-- `sling:resourceType` is `slingPipes/authorizable`
-- `expr` should be an authorizable id, or void (but then input should be an authorizable)
-- `autoCreateGroup` (boolean) if autorizable id is here, but the authorizable not present, then create group with given id (in that case, considered as a write pipe)
-- `addMembers` (stringified json array) if authorizable is a group, add instanciated members to it (in that case, considered as a write pipe)
-- `addToGroup` (expression) add found authorizable to instanciated group (in that case, considered as a write pipe)
-- `bindMembers` (boolean) if found authorizable is a group, bind the members (in that case, considered as a write pipe)
-
-#### ParentPipe
-outputs the parent resource of input resource
-- `sling:resourceType` is `slingPipes/parent`
-
-#### FilterPipe
-outputs the input resource if its matches its configuration
-
-- `sling:resourceType` is `slingPipes/filter`
-- `conf` node tree that will be tested against the current input of the pipe, each `/conf/sub@prop=value` will triggers a test
-on `./sub@prop` property of the current input, testing if its value matches `value` regex. If the special `slingPipesFilter_noChildren=${true}`
-property is there with the value instantiated as a true boolean, then filter will pass if corresponding node has no children.
-- `slingPipesFilter_not='true'` inverts the expected result of the filter
-
-### containers
-#### Container Pipe
-assemble a sequence of pipes
-
-- `sling:resourceType` is `slingPipes/container`
-- `conf` node contains child pipes' configurations, that will be configured in the order they are found (note you should use sling:OrderedFolder)
-
-#### ReferencePipe
-execute the pipe referenced in path property
-
-- `sling:resourceType` is `slingPipes/reference`
-- `path` path of the referenced pipe
-
-### writers
-
-#### Write Pipe
-writes given nodes & properties to current input
-
-- `sling:resourceType` is `slingPipes/write`
-- `conf` node tree that will be copied to the current input of the pipe, each property's
-names and value will be written to the input resource. Input resource will be outputed.
-Note that properties that will be evaluated (in an expression) as `null` for a given input resource will be
-removed from it. E.g. `./conf/some/node@prop=${null}` will add `./conf/some/node` structure
-if not in current input resource, but remove its `prop` property if any).
-
-### MovePipe
-JCR move of current input to target path (can be a node or a property)
-
-- `sling:resourceType` is `slingPipes/mv`
-- `expr` target path, note that parent path must exists
-
-#### RemovePipe
-removes the input resource, returns the parent, regardless of the resource being a node, or
-a property
-
-- `sling:resourceType` is `slingPipes/rm`
-- `conf` node tree that will be used to filter relative properties & subtrees to the current resource to remove.
-A subnode is considered to be removed if it has no property configured, nore any child.
-
-#### PathPipe
-get or create path given in expression
-
-- `sling:resourceType` is `slingPipes/path`
-- `nodeType` node type of the intermediate nodes to create
-- `autosave` should save at each creation (will make things slow, but sometimes you don't have choice)
-
-## Making configuration dynamic with pipe bindings
-in order to make things interesting, most of the configurations are javascript template strings, hence valid js expressions reusing bindings (from configuration, or other pipes).
-
-Following configurations are evaluated:
-
-- `path`
-- `expr`
-- name/value of each property of some pipes (write, remove)
-
-you can use name of previous pipes in the pipe container, or the special binding `path`, where `path.previousPipe`
-is the path of the current resource of previous pipe named `previousPipe`
-
-global bindings can be set at pipe execution, external scripts can be added to the execution as well (see pipe
-configurations)
-
-## How to execute a pipe
-for now it's possible to execute Pipes through GET (read) or POST (read/write) commands:
-
-### Request Path
-
-- either you'll need to create a slingPipes/plumber resource, say `etc/pipes` and then to execute
-
-curl -u admin:admin -F "path=/etc/pipes/mySamplePipe" http://localhost:8080/etc/pipes.json
-
-- either you execute the request directly on the pipe Path, e.g.
-
-curl -u admin:admin http://localhost:8080/etc/pipes/mySamplePipe.json
-
-which will return you the path of the pipes that have been through the output of the configured pipe.
-
-### Request Parameter `binding`
-
-you can add as `bindings` parameter a json object of global bindings you want to add for the execution of the pipe
-
-e.g.
-
-
-curl -u admin:admin -F "path=/etc/pipes/test" -F "bindings={testBinding:'foo'}" http://localhost:4502/etc/pipes.json
-
-
-will returns something like
-
-{"size":2, "items":["/one/output/resource", "another/one"]}
-
-### Request Parameter `writer`
-
-you can add as `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.
-Note
-this works only if the pipe called is a container
-pipe.
-
-e.g.
-
-
-curl -u admin:admin http://localhost:4502/etc/pipes/users.json?writer={"user":"${user.fullName}"}
-
-will returns something similar to
-
-{"size":2, "items":[{'user':'John Smith','path':'/home/users/q/q123jk1UAZS'},{'user':'John Doe','path':'/home/users/q/q153jk1UAZS'}]}
-
-### Request Parameter `dryRun`
-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
-
-### Request Parameter `size`
-default response is truncated to 10 items, if you need more (or less), you can modify that settings with the size parameter
-
-## sample configurations
-
-### slingQuery | write
-this pipe parse all profile nodes, and
-
-{
-"sling:resourceType":"slingPipes/container",
-"name":"Dummy User prefix Sample",
-"jcr:description":"prefix all full names of profile with "Mr" or "Ms" depending on gender",
-"conf":{
-"profile": {
-"sling:resourceType":"slingPipes/slingQuery",
-"expr":"nt:unstructured#profile",
-"path":"/home/users"
-},
-"writeFullName": {
-"sling:resourceType":"slingPipes/write",
-"conf": {
-"fullName":"${(profile.gender === 'female' ? 'Ms ' + profile.fullName : 'Mr ' + profile.fullName)}",
-"generatedBy":"slingPipes"
-}
-}
-}
-}
-
-### slingQuery | multiProperty | authorizable | write
-{
-"jcr:primaryType": "sling:Folder",
-"jcr:description": "move badge<->user relation ship from badge MV property to a user MV property"
-"name": "badges",
-"sling:resourceType": "slingPipes/container",
-"conf": {
-"jcr:primaryType": "sling:OrderedFolder",
-"badge": {
-"jcr:primaryType": "sling:Folder",
-"jcr:description": "outputs all badge component resources",
-"expr": "[sling:resourceType=myApp/components/badge]",
-"path": "/etc/badges/badges-admin/jcr:content",
-"sling:resourceType": "slingPipes/slingQuery"
-},
-"profile": {
-"jcr:primaryType": "sling:Folder",
-"jcr:description": "retrieve all user ids from a mv property",
-"path": "${path.badge}/profiles",
-"sling:resourceType": "slingPipes/multiProperty"
-},
-"user": {
-"jcr:primaryType": "sling:OrderedFolder",
-"jcr:description": "outputs user resource",
-"expr": "profile",
-"sling:resourceType": "slingPipes/authorizable"
-},
-"write": {
-"jcr:primaryType": "sling:OrderedFolder",
-"jcr:descritption": "patches the badge path to the badges property of the user profile"
-"path": "${path.user}/profile",
-"sling:resourceType": "slingPipes/write",
-"conf": {
-"jcr:primaryType": "nt:unstructured",
-"badges": "+[${path.badge}]"
-}
-}
-}
-}
-
-
-### xpath | json | write
-this use case is for completing repository profiles with external system's data (that has an json api)
-
-{
-"jcr:primaryType": "nt:unstructured",
-"jcr:description": "this pipe retrieves json info from an external system and writes them to the user profile, uses moment.js, it
-distributes modified resources using publish distribution agent",
-"sling:resourceType": "slingPipes/container",
-"distribution.agent": "publish",
-"additionalScripts": "/etc/source/moment.js",
-"conf": {
-"jcr:primaryType": "sling:OrderedFolder",
-"profile": {
-"jcr:primaryType": "sling:OrderedFolder",
-"expr": "/jcr:root/home/users//element(profile,nt:unstructured)[@uid]",
-"jcr:description": "query all user profile nodes",
-"sling:resourceType": "slingPipes/xpath"
-},
-"json": {
-"jcr:primaryType": "sling:OrderedFolder",
-"expr": "${(profile.uid ? 'https://my.external.system.corp.com/profiles/' + profile.uid.substr(0,2) + '/' + profile.uid + '.json' : '')",
-"jcr:description": "retrieves json information relative to the given profile, if the uid is not found, expr is empty: the pipe will do nothing",
-"sling:resourceType": "slingPipes/json"
-},
-"write": {
-"jcr:primaryType": "sling:OrderedFolder",
-"path": "path.profile",
-"jcr:description": "write json information to the profile node",
-"sling:resourceType": "slingPipes/write",
-"conf": {
-"jcr:primaryType": "sling:OrderedFolder",
-"background": "${json.opt('background')}",
-"about": "${json.opt('about')}",
-"birthday": "${(json.opt('birthday') ? moment(json.opt('birthday'), "MMMM DD").toDate() : '')}",
-"mobile": "${json.opt('mobile')}"
-}
-}
-}
-}
-
-### xpath | parent | rm
-
-{
-"jcr:primaryType": "nt:unstructured",
-"jcr:description": "this pipe removes user with bad property in their profile",
-"sling:resourceType": "slingPipes/container",
-"conf": {
-"jcr:primaryType": "sling:OrderedFolder",
-"profile": {
-"jcr:primaryType": "sling:OrderedFolder",
-"expr": "/jcr:root/home/users//element(profile,nt:unstructured)[@bad]",
-"jcr:description": "query all user profile nodes with bad properties",
-"sling:resourceType": "slingPipes/xpath"
-},
-"parent": {
-"jcr:primaryType": "sling:OrderedFolder",
-"jcr:description": "get the parent node (user node)",
-"sling:resourceType": "slingPipes/parent"
-},
-"rm": {
-"jcr:primaryType": "sling:OrderedFolder",
-"jcr:description": "remove it",
-"sling:resourceType": "slingPipes/rm",
-}
-}
-}
-
-some other samples are in https://github.com/npeltier/sling-pipes/tree/master/src/test/
-
-# Compatibility
-For running this tool on a sling instance you need:
-
-- java 8 (Nashorn is used for expression)
-- slingQuery (3.0.0) (used in SlingQueryPipe)
-- jackrabbit api (2.7.5+) (used in AuthorizablePipe)
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/sling-query.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/sling-query.md b/content/documentation/bundles/sling-query.md
deleted file mode 100644
index ee2fd7f..0000000
--- a/content/documentation/bundles/sling-query.md
+++ /dev/null
@@ -1,68 +0,0 @@
-title=Sling Query
-type=page
-status=published
-~~~~~~
-
-SlingQuery is a Sling resource tree traversal tool inspired by the [jQuery](http://api.jquery.com/category/traversing/tree-traversal/) JavaScript API.
-
-## Introduction
-
-The recommended way to find resources in the Sling repository is using tree-traversal methods, like `listChildren()` and `getParent()` rather than JCR queries. The latter are great for listing resources with given properties, but we can't leverage the repository tree structure with such queries. On the other hand, using tree-traversal method is quite verbose. Consider following code that takes an resource and returns its first ancestor, being `cq:Page`, with given `jcr:content/cq:template` attribute:
-
-Resource resource = ...;
-while ((resource = resource.getParent()) != null) {
-if (!resource.isResourceType("cq:Page")) {
-continue;
-}
-Resource template = resource.getChild("jcr:content/cq:template");
-if (template != null && "my/template".equals(template.adaptTo(String.class))) {
-break;
-}
-}
-if (resource != null) {
-// we've found appropriate ancestor
-}
-
-SlingQuery is a tool that helps creating such queries in a more concise way. Above code could be written as:
-
-import static org.apache.sling.query.SlingQuery.$;
-// ...
-$(resource).closest("cq:Page[jcr:content/cq:template=my/template]")
-
-Dollar sign is a static method that takes the resource array and creates SlingQuery object. The `closest()` method returns the first ancestor matching the selector string passed as the argument.
-
-SlingQuery is inspired by the jQuery framework. jQuery is the source of method names, selector string syntax and the dollar sign method used as a collection constructor.
-
-## Features
-
-* useful [operations](https://github.com/Cognifide/Sling-Query/wiki/Method-list) to traverse the resource tree,
-* flexible [filtering syntax](https://github.com/Cognifide/Sling-Query/wiki/Selector-syntax),
-* lazy evaluation of the query result,
-* `SlingQuery` object is immutable (thread-safe),
-* fluent, friendly, jQuery-like API.
-
-## Installation
-
-Add following Maven dependency to your `pom.xml`:
-
-<dependency>
-<groupId>org.apache.sling</groupId>
-<artifactId>org.apache.sling.query</artifactId>
-<version>3.0.0</version>
-</dependency>
-
-## Documentation
-
-* [CIRCUIT 2014 presentation](http://cognifide.github.io/Sling-Query/circuit2014/)
-* [Basic ideas](https://github.com/Cognifide/Sling-Query/wiki/Basic-ideas)
-* [Method list](https://github.com/Cognifide/Sling-Query/wiki/Method-list)
-* [Selector syntax](https://github.com/Cognifide/Sling-Query/wiki/Selector-syntax)
-* [Operator list](https://github.com/Cognifide/Sling-Query/wiki/Operator-list)
-* [Modifier list](https://github.com/Cognifide/Sling-Query/wiki/Modifier-list)
-* [Hierarchy operator list](https://github.com/Cognifide/Sling-Query/wiki/Hierarchy-operator-list)
-* [Examples](https://github.com/Cognifide/Sling-Query/wiki/Examples)
-
-## External resources
-
-* See the [Apache Sling website](http://sling.apache.org/) for the Sling reference documentation. Apache Sling, Apache and Sling are trademarks of the [Apache Software Foundation](http://apache.org).
-* Method names, selector syntax and some parts of documentation are inspired by the [jQuery](http://jquery.com/) library.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/sling-settings-org-apache-sling-settings.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/sling-settings-org-apache-sling-settings.md b/content/documentation/bundles/sling-settings-org-apache-sling-settings.md
deleted file mode 100644
index 7d99a92..0000000
--- a/content/documentation/bundles/sling-settings-org-apache-sling-settings.md
+++ /dev/null
@@ -1,81 +0,0 @@
-title=Sling Settings and Run Modes (org.apache.sling.settings)
-type=page
-status=published
-~~~~~~
-
-# Overview
-
-The Sling Settings Bundle exposes the `SlingSettingsService` which allows access to the following information pertinent to a Sling instance:
-
-| Method | Bundle Context Property | Description |
-|--|--|--|
-| `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 getSlingHomePath()` | `sling.home` | The absolute filesystem path to the directory where Sling stores all its content |
-| `URL getSlingHome()` | `sling.home.url` | The Sling Home path as an `java.net.URL` instance |
-| `Set<String> getRunModes()` | `sling.run.modes` | The active Run Modes of the running Sling instance |
-
-The new Sling Settings Bundle replaces the former [Run Modes (org.apache.sling.runmode)]({{ refs.run-modes-org-apache-sling-runmode.path }}) Bundle and the `SlingSettingsService` previously provided by the Sling Engine bundle, as it also implements the run modes logic.
-
-## Selecting the active run modes
-The run modes are selected based on the `sling.run.modes` property (the "selection property"), specified in the Sling settings file or as a command-line parameter (which takes precedence), out of the valid run modes defined by the properties described below. The value is a String which contains a list of comma-separated run modes. If a run mode is given here which is not contained in any group of valid run modes (given in `sling.run.mode.install.options` or `sling.run.mode.options`) it is always active, on the other hand run modes which are contained in any of the predefined groups may be modified/removed (see below for the details).
-
-Using `-Dsling.run.modes=foo,bar` on the JVM command-line, for example, activates the *foo* and *bar* run modes if that combination is valid.
-
-The absolute truth about run modes definition and selection is found in the [RunModeImplTest](https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/settings/src/test/java/org/apache/sling/settings/impl/RunModeImplTest.java) which should be self-explaining.
-
-## Defining valid run modes
-Since [SLING-2662](https://issues.apache.org/jira/browse/SLING-2662) the valid run modes are defined by the `sling.run.mode.options` and `sling.run.mode.install.options` configuration properties, usually defined in the `sling.properties` file or in the provisioning model of a Sling Launchpad instance.
-
-The `sling.run.mode.install.options` property is only used on the first startup on the Sling instance and the run modes that it defines cannot be changed later.
-
-The `sling.run.mode.options` property on the other hand is used at each startup, so the run modes that it defines can be changed between executions of a given Sling instance.
-
-The value of the both these properties is a string which looks like:
-
-red,green,blue|one|moon,mars
-
-where *comma-separated run modes form a group*. The individual groups are separated by a pipe character (`|`, which is not an OR operation, it's just as separator). A group defines a number of run modes which are **mutually exclusive**. It means once a group is defined, exactly one run mode will be active from that group.
-
-The example from above consists out of 3 different groups
-
-1. `red,green,blue`
-2. `one`
-3. `moon,mars`
-
-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 :
-
-1. If none of the run modes in the options are selected, the first one from each group in the options is activated by default.
-1. If one is selected from a group in the options, this is active.
-1. If several are selected from one group in the options, the first one from the list of valid run modes is used.
-1. If the selected run mode is not mentioned in any of the option groups it is active
-
-Examples
-
-sling.run.mode.options=a,b|c,d,e
-
-User defined run modes (e.g. via property `sling.run.modes`) | Effectively active run modes
---- | ---
-(none) | `a,c`
-`a` | `a,c`
-`b` | `b,c`
-`a,b` | `a,c`
-`a,d` | `a,d`
-`a,e,f` | `a,e`
-
-Remember to look at the `RunModeImplTest` mentioned above for details, and feel free to enhance it with useful examples.
-
-### Getting the Run Modes of the Sling instance
-
-The `SlingSettings` service provides the Run Modes of the running Sling instance as in this example:
-
-:::java
-SlingSettings settings = ...get from BundleContext...
-Set<String> currentRunModes = settings.getRunModes();
-
-Set<String> expectedRunModes = new HashSet<String>(){{ add("foo");add("wii"); }};
-if(expectedRunModes.removeAll(currentRunModes)) {
-// at least one of (foo,wii) run modes
-// is active
-}
-
-Getting run modes in this way is usually not needed, it's better to define bundles or configurations that are only valid in specific run modes, rather than making decisions in code based on run modes.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/subsystem-installer-factory.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/subsystem-installer-factory.md b/content/documentation/bundles/subsystem-installer-factory.md
deleted file mode 100644
index 5b5e3f4..0000000
--- a/content/documentation/bundles/subsystem-installer-factory.md
+++ /dev/null
@@ -1,15 +0,0 @@
-title=Subsystems Installer Factory
-type=page
-status=published
-~~~~~~
-
-The subsystems installer factory provides support for subsystems to the [OSGI installer](/documentation/bundles/osgi-installer.html). The provisioning of artifacts is handled by installer providers like the file installer or the JCR installer.
-
-
-## Subsystems
-
-The subsystem file must end with ".esa" and the manifest must at least contain the subsystem symbolic name "Subsystem-SymbolicName" header.
-
-# Project Info
-
-* Subsystems installer factory ([org.apache.sling.installer.factory.subsystems](http://svn.apache.org/repos/asf/sling/trunk/installer/factories/subsystems))
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/tracer-config.png
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/tracer-config.png b/content/documentation/bundles/tracer-config.png
deleted file mode 100644
index 897259f..0000000
Binary files a/content/documentation/bundles/tracer-config.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/validation.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/validation.md b/content/documentation/bundles/validation.md
deleted file mode 100644
index af1c7f4..0000000
--- a/content/documentation/bundles/validation.md
+++ /dev/null
@@ -1,144 +0,0 @@
-title=Sling Validation
-type=page
-status=published
-~~~~~~
-
-[TOC]
-
-Many Sling projects want to be able to validate both Resources and request parameters. Through the Sling Validation framework this is possible with the help of validation model resources which define validation rules for a certain resourceType.
-
-# Prerequisites
-To use this validation framework the following bundles need to be deployed
-
-1. `org.apache.sling.validation.api`
-1. `org.apache.sling.validation.core`
-
-In addition a [service resolver mapping](/documentation/the-sling-engine/service-authentication.html) needs to be configured for the service name `org.apache.sling.validation.core`. The bound service user needs to have at least read access to all resources within the resource resolver's search paths (usually `/apps` and `/libs`).
-
-# Basic Usage
-To validate a resource one first needs to get a `ValidationModel` and then validate the resource with that model. Both functionalities are provided by the `ValidationService` OSGi service:
-
-::java
-try {
-ValidationModel validationModel = validationService.getValidationModel(resource, true);
-if (validationModel != null) {
-ValidationResult result = validationService.validate(resource, validationModel);
-if (!result.isValid()) {
-// give out validation messages from result.get
-}
-}
-} catch (IllegalStateException e) {
-// give out error message that the validation model is invalid!
-}
-
-Apart from that it is also possible to validate resources including all child resources having their own validation model (i.e. a merged view of the validation models is applied). The appropriate validation model is being looked up by getting the resource type for each node. Since by default the JCR will return the primary type in case there is no `sling:resourceType` property found on the node, either the 2nd parameter `enforceValidation` should be set to `false` or some resource types must be explicitly ignored by the given filter in the 3rd parameter `filter` to also properly support validation models which have children resources on their own.
-
-::java
-try {
-final Predicate ignoreResourceType1Predicate = new Predicate<Resource>() {
-@Override
-public boolean test(final Resource resource) {
-return !"resourcetype1".equals(resource.getResourceType());
-}
-};
-ValidationResult result = validationService.validateResourceRecursively(resource, false, ignoreResourceType1Predicate, false);
-if (!result.isValid()) {
-// give out validation messages from result.getFailureMessages()
-}
-
-} catch (IllegalStateException e) {
-// give out error message that an invalid validation model for at least one sub resource was found
-} catch (IllegalArgumentException e) {
-// one of the resource types is absolute or there was no validation model found for at least one sub resource
-}
-
-All methods to retrieve a validation model support a boolean parameter `considerResourceSuperTypeModels`. If this is set to true, the validation model is not only being looked up for exactly the given resource type but also for all its resource super types. The returned model is then a merged model of all found validation model along the resource type hierarchy.
-
-## ValidationResult
-The `ValidationResult` indicates whether a given `Resource` or `ValueMap` is valid or invalid according to a given validation model. In the latter case it aggregates one or more `ValidationFailure`s. Each `ValidationFailure` is encapsulating an error message and a severity. The severity may be set on the following locations (where locations on top may overwrite severity from locations below):
-
-1. validation model (per use case of a `Validator`)
-1. severity defined on the `Validator`
-1. the default severity (may be set through the OSGi configuration for PID `org.apache.sling.validation.impl.ValidationServiceImpl`, is 0 by default)
-
-You have to use a `ResourceBundle` ([Internationalization Support](/documentation/bundles/internationalization-support-i18n.html)) to resolve the message for a specific locale. By default Sling Validation comes only with English failure messages.
-
-# 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*).
-
-The resources should have the following format:
-
-Property/Resource Name | Property or Resource | Type | Description | Mandatory | Example
--------------------- | ------- | -------------- | -------------| --------- | ------
-`sling:resourceType` | Property | `String` | Always `sling/validation/model`, otherwise model will never be picked up by Sling Validation. | yes | `sling/validation/model`
-`validatingResourceType` | 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`
-`applicablePaths` | 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`
-`properties<propertyName>` | Resource | - | 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 | `false`
-`properties<propertyName>optional` | 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`
-`properties<propertyName>propertyMultiple` | 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`
-`properties<propertyName>nameRegex` | 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]`
-`properties<propertyName>validators<validatorId>` | Resource | - | 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 | `false`
-`properties<propertyName>validators<validatorId>validatorArguments` | 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]*$`
-`properties<propertyName>validators<validatorId>severity` | Property | `Integer` | The severity which should be set on all emitted validation failures by this validator. | no | `0`
-`children<resourceName>` | Resource | - | 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 | `child1`
-`children<resourceName>nameRegex` | 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]`
-`children<resourceName>optional` | 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`
-`children<resourceName>properties` | Resource | - | The properties can be configured on the child level in the same way as on the root level. | no | -
-
-## Validation Model Inheritance
-Sling Validation optionally supports the inheritance of Sling Validation Models. This means not only the model for exactly the given resource type is considered, but also the models for all resource super types.
-To overwrite some property or child from one of the super type models, just define a property/child on the same level and with the same name in a model for a resource type which is more specific. That way the property/child on the super validation model is no longer effective.
-
-## Precedence of Validation Models
-In case there are multiple validation models registered for the same resource type the one gets chosen which has the longest matching applicablePath. In case even that does not resolve to a single model the one in the first resource resolver's search path is chosen (models below `/apps` before the ones below `/libs`). If even that does not resolve to a single validation model any of the equally ranked models might be picked.
-
-# Usage in [Sling Models](/documentation/bundles/models.html)
-## Since Sling Models 1.2.0
-See [Sling Models validation](/documentation/bundles/models.html#validation)
-
-## Before Sling Models 1.2.0
-One needs to call the validate method within the PostConstruct method of the according Sling Model
-
-::java
-@SlingObject
-protected Resource resource;
-
-@OSGiService
-protected ValidationService validation;
-
-@PostConstruct
-public void validate() {
-try {
-ValidationModel validationModel = validation.getValidationModel(resource);
-if (validationModel == null) {
-LOG.warn("No validation defined for resource '{}' with type '{}'", resource.getPath(), resource.getResourceType());
-
-} else {
-ValidationResult result = validation.validate(resource, validationModel);
-if (!result.isValid()) {
-// give out the validation result
-}
-}
-} catch (IllegalStateException e) {
-LOG.warn("Invalid validation model for resource '{}' with type '{}'", resource.getPath(), resource.getResourceType());
-}
-}
-
-# Validators
-
-Validator ID | Description | Parameters | Since
----------------|-------------|------------|-------
-[`org.apache.sling.validation.core.RegexValidator`](https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/core/src/main/java/org/apache/sling/validation/impl/validators/RegexValidator.java) | 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](http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html). Only if the property value matches this expression it is considered valid. | 1.0.0
-
-# Writing Validators
-To write a validator one needs to implement the [`org.apache.sling.validation.spi.Validator`](https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/api/src/main/java/org/apache/sling/validation/spi/Validator.java) interface in an OSGi service (look at [`org.apache.sling.validation.core.RegexValidator`](https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/core/src/main/java/org/apache/sling/validation/impl/validators/RegexValidator.java) for an example).
-That interface defines the method `validate`. That is called for each property which is bound to the validator through the validation model.
-Each validator needs to specify one type parameter which defines upon which classes the validator can act (usually `String`). Array types are also supported here. Collection types are not supported. If a property value cannot be converted to the requested type from the validator (through `ValueMap.get(name, type)`), validation will fail.
-
-In addition the OSGi service must expose a String property named `validation.id`. The value of this property should always start with the providing bundle's symbolic name. Only through this value the validator can be referenced from validation models. If multiple validators have the same `validation.id` value the one with the highest service ranking gets always chosen.
-
-A validator may also expose a service property named `validation.severity` with an Integer value. This defines the default severity of the Validator (which may be overwritten in the validation model).
-
-# References
-1. [Apache Sling Generic Validation Framework, adaptTo 2014](http://www.slideshare.net/raducotescu/apache-sling-generic-validation-framework)
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/web-console-extensions.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/web-console-extensions.md b/content/documentation/bundles/web-console-extensions.md
deleted file mode 100644
index fef0adb..0000000
--- a/content/documentation/bundles/web-console-extensions.md
+++ /dev/null
@@ -1,41 +0,0 @@
-title=Web Console Extensions
-type=page
-status=published
-~~~~~~
-
-The Apache Sling project provides two extensions to the [Apache Felix Web Console](http://felix.apache.org/site/apache-felix-web-console.html) (in addition to a number of plugins, of course):
-
-[TOC]
-
-## Branding (org.apache.sling.extensions.webconsolebranding)
-
-The Apache Sling Web Console Branding provided by Apache Sling is currently just for the product logo displayed in the upper right corner of the Web Console and some titles and strings.
-
-This bundle will attach as a fragment bundle to the Apache Felix Web Console bundle. To enable it after installation into a running system, you might have to refresh the package imports of the Apache Felix Web Console bundle. If you install using the Apache Felix Web Console bundle installation functionality, this will be taken care of by the Web Console.
-
-
-## Security Provider (org.apache.sling.extensions.webconsolesecurityprovider)
-
-The Apache Sling Web Console Security Provider implements the Apache Felix Web Console `WebConsoleSecurityProvider` and `WebConsoleSecurityProvider2` interface for authenticating Web Console users against the JCR repository. Each username and password presented is used to login to the JCR repository and to check the respective session.
-
-1. Ensure the username and password can be used to login to the default workspace. If not, access is denied
-1. If the username presented is one of the user names configured with the `users` configuration property, access is granted.
-1. Otherwise if the user is a (direct or indirect) member of one of the groups configured with the `groups` configuration property, access is granted.
-
-Access is denied if the username and password cannot be used to login to the default workspace or if the user is neither one of the configured allowed users nor in any of the configured groups.
-
-### Configuration
-
-The Security Provider is configured with the configuration PID `org.apache.sling.extensions.webconsolesecurityprovider.internal.SlingWebConsoleSecurityProvider` supporting the following properties:
-
-| Property | Type | Default Value | Description
-|--|--|--|
-| `users` | `String`, `String[]` or `Vector<String>` | admin | The list of users 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 |
-
-Note, that while the default value explicitly grants the *admin* user to access the Web Console it is suggested that system administrators define a special group and assign users with Web Console access to this group.
-
-### Authentication Handling
-
-As long as the web console security provider bundle is not activate and has not installed one of the above mentioned services, the default authentication of the web console is used. Once the bundle is active and a JCR repository service is available, the repository is used for authentication as explained above. But still the login form of the web console is used which is usually basic authentication.
-Once startup is finished and a Sling authentication service is available as well, the security provider replaces the JCR repository based auth provider with a Sling based auth provider. Both authenticate against the JCR repository, however the Sling based one using Sling to render the login form. Therefore, this provider is not registered until startup is finished
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/xml-support.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/xml-support.md b/content/documentation/bundles/xml-support.md
deleted file mode 100644
index 5513fec..0000000
--- a/content/documentation/bundles/xml-support.md
+++ /dev/null
@@ -1,11 +0,0 @@
-title=XML support
-type=page
-status=published
-~~~~~~
-Excerpt: XML mechanisms supported by Sling
-
-Out of the box, Sling provides no special bundles for XML. However, Sling supports multiple mechanisms and libraries. The ones we have validated with integration tests are:
-
-* XPath ( see the [XPathServlet](http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/XpathServlet.java) )
-* SAX ( see the [SaxServlet](http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/SaxServlet.java) )
-* DOM ( see the [DomServlet](http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/DomServlet.java) )
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/configuration.md
----------------------------------------------------------------------
diff --git a/content/documentation/configuration.md b/content/documentation/configuration.md
deleted file mode 100644
index 147277f..0000000
--- a/content/documentation/configuration.md
+++ /dev/null
@@ -1,183 +0,0 @@
-title=Configuration
-type=page
-status=published
-~~~~~~
-
-
-## Introduction
-
-Configuration in Sling is aligned with respective support by the OSGi specification:
-
-* Framework and Java system properties are available through the `BundleContext.getProperty(String)` method. These properties are provided in Sling through the Sling launcher.
-* Bundle Header values are available through the `Bundle.getHeaders()` and `Bundle.getHeaders(String)` methods. These header values are set by the bundle developer in the `META-INF/MANIFEST.MF` file. In fact, all main manifest attributes are available through these methods.
-* Components managed by the Service Component Runtime and declared in component descriptor files listed in the `Service-Component` manifest header access configuration properties through the `ComponentContext.getProperties()` method. These properties have three sources:
-1. Configuration specified specifically for factory components
-2. Properties retrieved from the Configuration Admin Service
-3. Properties set in the component descriptor
-* Configuration properties provided to `ManagedService` and `ManagedServiceFactory` instances by the Configuration Admin Service.
-
-For the discussion to follow we differentiate between initial configuration provided by Framework and system properties and managed configuration provided by the Configuration Admin Service.
-
-Components managed by the Service Component Runtime are generally configured (as listed above) through the descriptor properties and configuration set by Configuration Admin Service configuration. The descriptor property values may be seen as configuration default values set by the component developer, which may be overwritten by user configuration through the Configuration Admin Service. Components may but are not required to make use of Framework properties by accessing the `BundleContext` through the `ComponentContext` given to the `activate(ComponentContext)` method of the component.
-
-
-
-## Initial Configuration
-
-The lifecycle of the OSGi framework implemented by an instance of the `org.apache.felix.framework.Felix` class is managed by the Sling launcher class `org.apache.sling.launcher.Sling`. This class is used by the standalone main class (`org.apache.sling.launcher.main.Main`) and the Sling Servlet (`org.apache.sling.launcher.servlet.SlingServlet`) to control the lifecycle.
-
-The Sling launcher is responsible to provide the Framework properties to the OSGi framework. The properties are prepared as a `java.util.Map<String, String>` instance as follows (later steps may overwrite properties defined in earlier steps) :
-
-1. Load core properties from the embedded `sling.properties` file.
-1. Resolve any property file inclusions. This is mainly used to resolve the correct JRE package definitions for the JRE version used.
-1. Overwrite with any properties provided by the main class or the Sling Servlet.
-1. Make sure the `sling.home` property is set defining a sensible default value if missing
-1. Load the contents of the `${sling.home}/sling.properties` file
-1. Overwrite properties with Java system properties. This step only considers system properties of the same names as properties already existing. That is, the system properties are not just copied into the properties here. Additionally this step my be omitted if the `sling.ignoreSystemProperties` property is set to `true`.
-1. Resolve any property file inclusions. This may be used to provide more configurability depending on the integration.
-1. Handle OSGi boot delegation support (see below).
-1. Resolve property references of the form `${propName`}
-1. For each property value starting with `ontext:/` do the following, assuming the value to be an URL with scheme `context:`:
-* Copy the application resource to `${sling.home`} preserving the URL path unless such a file already exists.
-* Replace the property value with the path to the newly created file. The path has the form `${sling.home}/relpath`.
-1. Store the properties as `${sling.home}/sling.properties` to be re-used on next startup
-1. Setup Bundle auto installation for the Felix Framework
-
-Using file system copies of the initial configuration and referred files, it is easy to modify this configuration without the need to unpack and repackage the web application archive.
-
-The only property really required is actually the `sling.home` property, which defines the file system location where runtime files will be placed. The default if this property is missing will be *sling* in the current working directory as defined the `user.dir` system property.
-
-
-
-### Standalone Application
-
-When launching Sling as a standalone application the `sling-app.jar` file is used. This is an executable JAR File. The `sling.properties` file as well as the `sling_install.properties` and JRE specific properties files are located at the root of the JAR file hierarchy.
-
-The standalone application currently sets properties for the third step of the configuration setup to ensure the HTTP Servlet integration is using the Apache Felix *http.jetty* bundle. Additionally system properties may be set using the `-D` command line switch of the Java binary.
-
-In addition the following command line arguments are accepted:
-
-| Argument | Sling property | Description |
-|--|--|--|
-| `-l loglevel` | `org.apache.sling.osgi.log.level` | The initial loglevel (0..4, FATAL, ERROR, WARN, INFO, DEBUG) |
-| `-f logfile` | `org.apache.sling.osgi.log.file` | The log file, "-" for stdout |
-| `-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. |
-
-The standalone application exits with status code 0 (zero) if Sling terminates normally, that is if the OSGi framework is stopped or if just the usage note has been displayed. If any error occurrs during command line parsing, the cause is printed to the error output and the application exists with status code 1 (one). If the OSGi framework fails to start, the cause is printed to the error output and the application exists with status code 2.
-
-
-### Web Application
-
-When launching Sling as a web application using the `sling-servlet.war` or any derived Web Application archive file, the `sling.properties` file is located in the `WEB-INF` folder along with the `sling_install.properties` and JRE specific properties files.
-
-The Sling Servlet uses the Servlet Context and Servlet `init-param` configurations to prepare the properties for the third step of the configuration setup.
-
-If the OSGi framework fails to startup for any reason a `javax.servlet.UnavailableException`.
-
-
-
-### Property File Inclusions
-
-Twice in the configuration setup (second and seventh step) any property file inclusions will be handled. Property files may be included by defining one or more properties containing a comma-separated list of properties files to include. Property file inclusion looks at the `sling.include` property and any other property whose prefix is `sling.include.`. When such properties exist, the files listed in those properties are included.
-
-The order of handling the property file inclusion properties is defined as natural sort order of the actual property names. So the properties of the files listed in the `sling.include.first` property will be loaded before the files listed in the `sling.include.second` but after the files listed in the `sling.include.a` property.
-
-Any file which does not exist is silently ignored.
-
-The names of the files are resolved as follows:
-
-1. If a resource exists at the same location as the initial `sling.properties` file packaged with the application, that resource is used
-1. If the name is a relative file name, it is looked for in the `sling.home` directory
-1. If the name is an absolute file name, it is used as is
-
-*Example*
-
-The packaged `sling.properties` file contains the following properties file inclusion setting:
-
-
-sling.include.jre = jre-${java.specification.version}.properties
-
-
-This is used to include the JRE package list to be made visible inside the OSGi framework.
-
-
-
-### OSGi Boot Delegation Support
-
-Some packages may have to be shared between bundles in an OSGi framework and the rest of Java VM in which the framework has been launched. This is especially true for OSGi framework instances launched in embedding such as Servlet Containers. In the case of a Sling Application accessing a JCR Repository launched in a different Web Application, this mainly concerns an API packages as well as the JNDI Initial Factory package(s).
-
-To cope with this sharing issue, the OSGi core specification defines two properties, which may list packages to be used from the environment:
-
-
-* *`org.osgi.framework.system.packages`* - This property lists package names which are added to the list of exported packages of the system bundle of the OSGi framework. These packages are used in the resolution process just as any package listed in an `Export-Package` bundle manifest header.
-* *`org.osgi.framework.bootdelegation`* - This property lists packages, which are always used from the environment. As such, these packages will never be looked up in package wirings as are packages imported by listing them in the `Import-Package` bundle manifest header.
-
-
-Sometimes, especially in the Servlet Container case, it is important to use the shared classes from the container and not resolve using standard OSGi resolution. In such cases, the packages of these shared classes must be listed in the `org.osgi.framework.bootdelegation` property. Sling provides a mechanism to extend the default setting of the `org.osgi.framework.bootdelegation` property by adding properties prefixed with `sling.bootdelegation.`. The value of each of these prefixed properties is conditionally appended to the `org.osgi.framework.bootdelegation` property. *Conditionally* means, that the property name may contain the fully qualified name of a class, which is checked to see whether to add the property value or not.
-
-*Examples*
-
-| Configuration | Description |
-|--|--|
-| `sling.bootdelegation.simple = com.some.package` | This setting unconditionally adds the `com.some.package` package to the `org.osgi.framework.bootdelegation` property |
-| `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. |
-
-
-*Note* Even though packages listed in the `org.osgi.framework.bootdelegation` property will always be loaded from the environment, any bundles using these packages must still import them (through `Import-Package` or `DynamicImport-Package`) and the bundles must resolve for being usable.
-
-
-
-### OSGi System Packages Support
-
-As listed in the above section on OSGi Boot Delegation Support, the `org.osgi.framework.system.packages` property may be used to extend the export list of the system bundle. Similar to the support for extending the boot delegation packages list, Sling supports extending the system packages list. The mechanism to extend the default setting of the `org.osgi.framework.system.packages` property by adding properties prefixed with `sling.system.packages.`. The value of each of these prefixed properties is conditionally appended to the `org.osgi.framework.system.packages` property. *Conditionally* means, that the property name may contain the fully qualified name of a class, which is checked to see whether to add the property value or not.
-
-*Examples*
-
-| Configuration | Description |
-|--|--|
-| `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.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. |
-
-
-*Note* Packages listed in the `org.osgi.framework.system.packages` required by any bundles must be imported by those bundles by listing them in the `Import-Package` or `DynamicImport-Package` manifest header.
-
-
-
-## Recommendations for property names
-
-The following system property names are reserved:
-
-* Names starting with `org.osgi.` are reserved for OSGi defined Framework properties
-* Names starting with `org.apache.felix.` are reserved for the Felix Framework
-* Names starting with `sling.` and `org.apache.sling.` are reserved for Sling
-
-To prevent property name collisions, I suggest the following convention:
-
-* Use fully qualified property names for initial configuration through Framework properties
-* Use unqualified property names for configuration through the Configuration Admin Service
-
-
-## Well Known Properties
-
-The following table is a collection of well known property names from different parts of Project Sling.
-
-| Property | Description |
-|--|--|
-| `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.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.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. |
-| `obr.repository.url` | A comma-separated list of OSGi Bundle Repository URLs. See *sling.properties* on the page [the Sling Launchpad](/documentation/the-sling-engine/the-sling-launchpad.html#slingproperties). |
-| `org.apache.sling.commons.log.*` | Properties providing initial configuration to the Sling Log Service. See *sling.properties* on the page [the Sling Launchpad](/documentation/the-sling-engine/the-sling-launchpad.html#slingproperties). |
-
-
-
-## Configuration Admin Service
-
-Configuration of the system entities, such as services and components, by the system administrator is supported the Configuration Admin Service. The Configuration Admin Service acts as the center for the management of the configuration data, to which GUI-based tools will connect to retrieve and update configuration data. The Configuration Admin Service is responsible for persisting the configuration data and for providing configuration consumers with the configuration data. Specifically services registered with the `ManagedService` or `ManagedServiceFactory` interfaces are updated with the configuration upon updated. The Service Component Runtime on the other hand recognizes updated configuration and provides it to the managed components as defined in the OSGi Declarative Services Specification.
-
-By default the Configuration Admin Service is installed when Sling is started for the first time. This service is used by the Service Component Runtime launching the OSGi components declared in the bundles with configuration values. The Sling Management Console provides a simple GUI to manage these configuration elements on the 'Configuration' page.
-
-For more information on the Configuration Admin Service refer to the OSGi Configuration Admin Service Specification in the OSGi Service Platform Service Compendium book.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/development.md
----------------------------------------------------------------------
diff --git a/content/documentation/development.md b/content/documentation/development.md
deleted file mode 100644
index 97f16be..0000000
--- a/content/documentation/development.md
+++ /dev/null
@@ -1,57 +0,0 @@
-title=Development
-type=page
-status=published
-~~~~~~
-
-Welcome to the wonderful world of extending Sling. Refer to these pages to find out how we envision the extension of Sling and how to do it.
-
-
-## Using Sling as your Development Framework
-
-Look here for more information on developper support when your are using Sling to build your own applications.
-
-* [Getting and Building Sling](/documentation/development/getting-and-building-sling.html)
-* [Defining and Launching a Sling based Application](/documentation/development/slingstart.html)
-* [Embedding Sling](/documentation/development/embedding-sling.html)
-* [Logging](/documentation/development/logging.html)
-* [Client Request Logging](/documentation/development/client-request-logging.html)
-* [Monitoring Requests](/documentation/development/monitoring-requests.html)
-* [Repository Based Development](/documentation/development/repository-based-development.html)
-* [Sling IDE Tooling](/documentation/development/ide-tooling.html)
-* [Leveraging JSR-305 null annotations](/documentation/development/jsr-305.html)
-
-
-## Testing Sling-based Applications
-* [Testing Sling-based Applications](/documentation/tutorials-how-tos/testing-sling-based-applications.html)
-* [Junit Server-Side Tests Support](/documentation/bundles/org-apache-sling-junit-bundles.html)
-* [Resource Resolver Mock](/documentation/development/resourceresolver-mock.html)
-* [Sling Mocks](/documentation/development/sling-mock.html)
-* [OSGi Mocks](/documentation/development/osgi-mock.html)
-* [JCR Mocks](/documentation/development/jcr-mock.html)
-* [Hamcrest integration](/documentation/development/hamcrest.html)
-
-
-## Maven Stuff
-
-Sling is using Apache Maven 3 as its build system. Over time we have created a number of Maven 3 plugins and gathered a whole range of knowledge about using Maven.
-
-* [Maven Sling Plugin](http://sling.apache.org/components/maven-sling-plugin/)
-* [HTL Maven Plugin](http://sling.apache.org/components/htl-maven-plugin/)
-* [SlingStart Maven Plugin](http://sling.apache.org/components/slingstart-maven-plugin/)
-* [Maven Launchpad Plugin](/documentation/development/maven-launchpad-plugin.html)
-* [JspC Maven Plugin](http://sling.apache.org/components/jspc-maven-plugin/)
-* [Maven Archetypes](/documentation/development/maven-archetypes.html)
-* [Maven Tips & Tricks](/documentation/development/maventipsandtricks.html)
-
-
-## Sling Development
-
-Last but not least, here is some more information on how we ourselves are working on Sling
-
-* [Dependency Management](/documentation/development/dependency-management.html)
-* [Version Policy](/documentation/development/version-policy.html)
-* [Issue Tracker](/documentation/development/issue-tracker.html)
-* [Release Management](/documentation/development/release-management.html)
-* [Maven Usage](/documentation/development/maven-usage.html)
-* To run our integration tests suite see the [launchpad/testing module README](http://svn.apache.org/repos/asf/sling/trunk/launchpad/testing/README.txt) and the [launchpad/integration-tests README](http://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/README.txt) for how to run individual integration tests. We use the [sling-IT](https://issues.apache.org/jira/issues/?jql=labels%20%3D%20sling-IT) label in JIRA for known issues with our integration tests.
-* A Sonar analysis is available on the [analysis.apache.org](https://analysis.apache.org/dashboard/index/org.apache.sling:sling-builder) server.
[51/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/context-aware-configuration/context-aware-configuration.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/context-aware-configuration/context-aware-configuration.html b/documentation/bundles/context-aware-configuration/context-aware-configuration.html
new file mode 100644
index 0000000..2836168
--- /dev/null
+++ b/documentation/bundles/context-aware-configuration/context-aware-configuration.html
@@ -0,0 +1,146 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Apache Sling Context-Aware Configuration</h1></header><p>[TOC]</p>
+<h1>About</h1>
+<p>These bundles provide a service API that can be used to get context-aware configurations. Context-aware configurations are configurations that are related to a content resource or a resource tree, e.g. a web site or a tenant site.</p>
+<p>Here is an example how your content structure may look like:</p>
+<p><img src="context-aware-config-example.png" alt="Configuration example" /></p>
+<p>The application needs different configuration for different sites, regions and tenants = different contexts. Some parameters may be shared, so inheritance for nested contexts and from global fallback values is supported as well. You have full control which content subtrees are the contexts in your application, the structure above is only an example.</p>
+<p>Using the Context-Aware Configuration Java API you can get the matching configuration for each content resource without caring where it is stored or how the inheritance works.</p>
+<h1>Java API</h1>
+<p>To get and use configurations, the Java API must be used. Any using code must not make any assumptions on how the context-aware configurations are searched or stored!</p>
+<p>The Java API consists of two parts:</p>
+<ul>
+ <li>Context-Aware Resources: 'Low-level' API for accessing configuration resources (which can be anything, e.g. workflow definitions)</li>
+ <li>Context-Aware Configurations: 'High-level' API for accessing configuration data (key/value pairs)</li>
+</ul>
+<p>In most cases you will use only the 'High-level' API for getting context-aware configurations.</p>
+<h2>Context-Aware Resources</h2>
+<p>The base concept are context-aware resources: for a given content resource, a named configuration resource can be get. The service for getting the configuration resources is called the ConfigurationResourceResolver. This service has two methods:</p>
+<ul>
+ <li>getting a named configuration resource</li>
+ <li>getting all child resources of a named configuration resource.</li>
+</ul>
+<p>For example to get a configuration resource for a content resource at /content/mysite/page1, you would get a reference to the OSGi service <code>org.apache.sling.caconfig.resource.ConfigurationResourceResolver</code> and write:</p>
+<h1>!java</h1>
+<p>Resource contentResource = resourceResolver.getResource("/content/mysite/page1");</p>
+<p>Resource configResource = configurationResourceResolver.getResource(contentResource, "my-bucket", "my-config");</p>
+<p>Or if you have several configuration resources of the same type and you need all of them:</p>
+<h1>!java</h1>
+<p>Collection<Resource> configResources = configurationResourceResolver.getResourceCollection(contentResource, "my-bucket", "my-config");</p>
+<p>The ConfigurationResourceResolver has a concept of "buckets" (2nd parameter in the method signatures) that allows to separate different types of configuration resources into different resource hierarchies, so you have a separate "namespaces" for the named configuration resources. For example one bucket for workflow definitions, one bucket for template definitions, one for key/value-pairs.</p>
+<p>The configuration name (3rd parameter) defines which configuration you are interested in. The name can be a relative path as well (e.g. <code>"sub1/my-config"</code>).</p>
+<h2>Context-Aware Configurations</h2>
+<p>While context-aware resources give you pure resources and your application code can decide what to do with it, the most common use case is some configuration. A configuration is usually described by an annotation class (like Declarative Services does for component configurations). These are typed configuration objects and the context-aware configuration support automatically converts resources into the wanted configuration type.</p>
+<p>Context-aware configurations are built on top of context-aware resources. The same concept is used: configurations are named and the service to get them is the ConfigurationResolver. You can get a reference to the OSGi service <code>org.apache.sling.caconfig.ConfigurationResolver</code> - it has a single method to get a ConfigurationBuilder. Alternatively you can directly adapt your content resource directly to the ConfigurationBuilder interface and get the configuration:</p>
+<h1>!java</h1>
+<p>Resource contentResource = resourceResolver.getResource("/content/mysite/page1");</p>
+<p>MyConfig config = contentResource.adaptTo(ConfigurationBuilder.class).as(MyConfig.class);</p>
+<p>Or if you want to get a list of configurations:</p>
+<h1>!java</h1>
+<p>Collection<MyConfig> configs = contentResource.adaptTo(ConfigurationBuilder.class).asCollection(MyConfig.class);</p>
+<p>The ConfigurationBuilder also supports getting the configurations as ValueMap or by adapting the configuration resources e.g. to a Sling Model. In this case you have to specify a configuration name which is otherwise derived automatically from the annotation class.</p>
+<p>Internally the ConfigurationResolver used the ConfigurationResourceResolver to get the configuration resources. It uses always the bucket name <code>sling:configs</code>.</p>
+<h1>Contexts and configuration references</h1>
+<p>When you use the <a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html">Default Implementation</a> contexts in the content resource hierarchy is defined by setting <code>sling:configRef</code> properties. Each resource that has a <code>sling:configRef</code> property set defines the root resource of a context, the whole subtree is the context. Within the subtree further nested contexts can be defined. The property contains a resource path pointing to a resource below <code>/conf</code>. This is the configuration reference.</p>
+<p>Example:</p>
+<p><img src="context-and-config-reference.png" alt="Context and config reference" /></p>
+<p>If you define nested contexts or use a deeper hierarchy of resourced in <code>/conf</code> the inheritance rules are applied. Additionally it is possible to define default values as fallback if no configuration resource exists yet in <code>/conf</code>. See <a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html">Default Implementation</a> for details.</p>
+<h1>Describe configurations via annotation classes</h1>
+<p>You need an annotation class for each configuration you want to read via the ConfigurationBuilder. The annotation classes may be provided by the applications/libraries you use, or you can define your own annotation classes for your application.</p>
+<p>The annotation class may look like this:</p>
+<h1>!java</h1>
+<p>@Configuration(label="My Configuration", description="Describe me") public @interface MyConfig {</p>
+<p>@Property(label="Parameter #1", description="Describe me") String param1();</p>
+<p>@Property(label="Parameter with Default value", description="Describe me") String paramWithDefault() default "defValue";</p>
+<p>@Property(label="Integer parameter", description="Describe me") int intParam();</p>
+<p>}</p>
+<p>The <code>@Configuration</code> annotation is mandatory. All properties on the <code>@Configuration</code> annotation and the <code>@Property</code> annotations are optional - they provide additional metadata for tooling e.g. configuration editors.</p>
+<p>By default the annotation class name is used as configuration name, which is also the recommended option. If you want to use an arbitrary configuration name you can specify it via a <code>name</code> property on the <code>@Configuration</code> annotation.</p>
+<p>You may specify custom properties (via <code>property</code> string array) for the configuration class or each properties. They are not used by the Sling Context-Aware configuration implementation, but may be used by additional tooling to manage the configurations.</p>
+<p>If you provide your own configuration annotation classes in your bundle, you have to export them and list all class names in a bundle header named <code>Sling-ContextAware-Configuration-Classes</code> - example:</p>
+<p>Sling-ContextAware-Configuration-Classes: x.y.z.MyConfig, x.y.z.MyConfig2</p>
+<p>To automate this you can use the Context-Aware Configuration bnd plugin (see next chapter).</p>
+<h1>Accessing configuration from HTL/Sightly templates</h1>
+<p>Context-Aware configuration contains a Scripting Binding Values provider with automatically registeres a <code>caconfig</code> variable in your HTL/Sightly scripts to directly access context-aware configurations. It supports both singleton configurations and configuration lists. Please note that configuration lists are only supported when configuration metadata is present (e.g. via an annotation class).</p>
+<p>Example for accessing a property of a singleton configuration (with a config name <code>x.y.z.ConfigSample</code>):</p>
+<h1>!html</h1>
+<dl>
+<dt>stringParam:</dt>
+<dd>${caconfig['x.y.z.ConfigSample'].stringParam}</dd>
+</dl>
+<p>Example for accessing a property of a configuration list (with a config name <code>x.y.z.ConfigSampleList</code>):</p>
+<h1>!html</h1>
+<p><ul data-sly-list.item="${caconfig['x.y.z.ConfigSampleList']}"> <li>stringParam: ${item.stringParam}</li> </ul></p>
+<p>If you want to access nested configurations you have to use a slash "/" as separator in the property name. Example:</p>
+<h1>!html</h1>
+<p>${caconfig['x.y.z.ConfigSample']['nestedConfig/stringParam']}</p>
+<h1>Context-Aware Configuration bnd plugin</h1>
+<p>A <a href="http://bnd.bndtools.org/">bnd</a> plugin is provided that scans the classpath of a bundle Maven project at build time and automatically generates a <code>Sling-ContextAware-Configuration-Classes</code> bundle header for all annotation classes annotated with <code>@Configuration</code>. It can be used by both <a href="http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html">maven-bundle-plugin</a> and <a href="https://github.com/bndtools/bnd/tree/master/maven">bnd-maven-plugin</a>, as both use the bnd library internally.</p>
+<p>Example configuration:</p>
+<h1>!xml</h1>
+<p><plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <!-- Generate bundle header containing all configuration annotation classes --> <_plugin>org.apache.sling.caconfig.bndplugin.ConfigurationClassScannerPlugin</_plugin> </instructions> </configuration> <dependencies> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.caconfig.bnd-plugin</artifactId> <version>1.0.2</version> </dependency> </dependencies> </plugin></p>
+<h1>Unit Tests with Context-Aware Configuration</h1>
+<p>When your code depends on Sling Context-Aware Configuration and you want to write Sling Mocks-based unit tests running against the Context-Aware configuration implementation you have to register the proper OSGi services to use them. To make this easier, a "Apache Sling Context-Aware Configuration Mock Plugin" is provided which does this job for you.</p>
+<p>Example for setting up the unit test context rule:</p>
+<h1>!java</h1>
+<p>import static org.apache.sling.testing.mock.caconfig.ContextPlugins.CACONFIG;</p>
+<p>public class MyTest {</p>
+<p>@Rule public SlingContext context = new SlingContextBuilder().plugin(CACONFIG).build();</p>
+<p>@Before public void setUp() { // register configuration annotation class MockContextAwareConfig.registerAnnotationClasses(context, SimpleConfig.class); } ...</p>
+<p>In you project define a test dependency (additionally the sling-mock dependency is required):</p>
+<h1>!xml</h1>
+<p><dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.caconfig-mock-plugin</artifactId> <scope>test</scope> </dependency></p>
+<p>Full example: <a href="https://github.com/apache/sling/blob/trunk/testing/mocks/caconfig-mock-plugin/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java">Apache Sling Context-Aware Configuration Mock Plugin Test</a></p>
+<h1>Customizing the configuration lookup</h1>
+<p>The Context-Aware Configuration implementation provides a set of Service Provider Interfaces (SPI) that allows you to overlay, enhance or replace the default implementation and adapt it to your needs.</p>
+<p>See <a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html">SPI</a> for details.</p>
+<p>You can also override specific context-aware configuration within an instance - see <a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-override.html">Override</a> for details.</p>
+<h1>Web Console plugins</h1>
+<p>The Context-Aware Configuration implementation provides two extension to the Felix Web Console:</p>
+<ul>
+ <li>A plugin "Sling / Context-Aware Configuration" that allows to test configuration resolution and prints outs all metadata. This is helpful debugging the resolution and collection and property inheritance. For each resource and property value the the real source resource path is listed.</li>
+ <li>A inventory printer "Sling Context-Aware Configuration" which lists all SPI implementations that are deployed, and additionally prints out all configuration metadata and override strings</li>
+</ul>
+<p>To use the web console plugin you need to configure a "Service User" mapping for the bundle <code>org.apache.sling.caconfig.impl</code> to a system user which has read access to all context and configuration resources. By default this should be <code>/content</code>, <code>/conf</code>, <code>/apps/conf</code> and <code>/libs/conf</code>.</p>
+<h1>Management API</h1>
+<p>The Context-Aware Configuration Implementation Bundle provides a Management API which allows to read and write configuration data. It supports only Context-Aware configurations, not context-aware resources. It should not be used directly in applications, but is intended to provide an API for editor GUIs and other tools which allow to manage configurations.</p>
+<p>The main entry point is the OSGi service <code>org.apache.sling.caconfig.management.ConfigurationManager</code>. It allows to get, write or delete singleton configurations and configuration lists. Configuration data is returned using <code>ConfigurationData</code> and <code>ConfigurationCollectionData</code> objects which also provide access to additional metadata about the resolving process and inheritance/override status of each property. Internally the configuration manager uses the <a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html">SPI</a> implementation to resolve and write the configuration data.</p>
+<p>Whenever configuration data is read or written from the configuration resources a filtering of property names is applied to make sure "system properties" like <code>jcr:primaryType</code> or <code>jcr:created</code> are not returned as part of the configuration data. A list of regular expressions for this filtering can be configured via the "Apache Sling Context-Aware Configuration Management Settings" OSGi configuration. The configuration is accessible to custom persistence implementations via the <code>org.apache.sling.caconfig.management.ConfigurationManagementSettings</code> OSGi service. By default all properties in the <code>jcr:</code> namespace are filtered out.</p>
+<h1>References</h1>
+<ul>
+ <li><a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html">Context-Aware Configuration - Default Implementation</a></li>
+ <li><a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html">Context-Aware Configuration - SPI</a></li>
+ <li><a href="http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-override.html">Context-Aware Configuration - Override</a></li>
+ <li><a href="https://adapt.to/2016/en/schedule/sling-context-aware-configuration.html">Sling Context-Aware Configuration - Talk from adaptTo() 2016</a></li>
+</ul></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/datasource-providers.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/datasource-providers.html b/documentation/bundles/datasource-providers.html
new file mode 100644
index 0000000..16256c9
--- /dev/null
+++ b/documentation/bundles/datasource-providers.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>DataSource Provider</h1></header><p>DataSource provider bundle supports creation of <code>DataSource</code> instance and registering them with the OSGi service registry. Application using the DataSource just obtains it from OSGi while an administrator can configure the DataSource via Felix WebConsole configuration UI.</p>
+<p>[TOC]</p>
+<h2>Pooled Connection DataSource Provider</h2>
+<p>This bundle enables creating and configuring JDBC DataSource in OSGi environment based on OSGi configuration. It uses <a href="http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html">Tomcat JDBC Pool</a> as the JDBC Connection Pool provider.</p>
+<ol>
+ <li>Supports configuring the DataSource based on OSGi config with rich metatype</li>
+ <li>Supports deploying of JDBC Driver as independent bundles and not as fragment</li>
+ <li>Exposes the DataSource stats as JMX MBean</li>
+ <li>Supports updating of DataSource connection pool properties at runtime without restart</li>
+</ol>
+<h3>Driver Loading</h3>
+<p>Loading of JDBC driver is tricky on OSGi env. Mostly one has to attach the Driver bundle as a fragment bundle to the code which creates the JDBC Connection.</p>
+<p>With JDBC 4 onwards the Driver class can be loaded via Java SE Service Provider mechanism (SPM) JDBC 4.0 drivers must include the file META-INF/services/java.sql.Driver. This file contains the name of the JDBC driver's implementation of java.sql.Driver. For example, to load the JDBC driver to connect to a Apache Derby database, the META-INF/services/java.sql.Driver file would contain the following entry:</p>
+<p>org.apache.derby.jdbc.EmbeddedDriver</p>
+<p>Sling DataSource Provider bundles maintains a <code>DriverRegistry</code> which contains mapping of Driver bundle to Driver class supported by it. With this feature there is no need to wrap the Driver bundle as fragment to DataSource provider bundle</p>
+<h3>Configuration</h3>
+<ol>
+ <li>Install the current bundle</li>
+ <li>Install the JDBC Driver bundle</li>
+ <li>Configure the DataSource from OSGi config for PID <code>org.apache.sling.datasource.DataSourceFactory</code></li>
+</ol>
+<p>If Felix WebConsole is used then you can configure it via Configuration UI at http://localhost:8080/system/console/configMgr/org.apache.sling.datasource.DataSourceFactory</p>
+<p><img src="/documentation/development/sling-datasource-config.png" alt="Web Console Config" /></p>
+<p>Using the config ui above one can directly configure most of the properties as explained in <a href="http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html">Tomcat Docs</a></p>
+<h3>Convert Driver jars to Bundle</h3>
+<p>Most of the JDBC driver jars have the required OSGi headers and can be directly deployed to OSGi container as bundles. However some of the drivers e.g. Postgres are not having such headers and hence need to be converted to OSGi bundles. For them we can use the <a href="http://bnd.bndtools.org/chapters/390-wrapping.html">Bnd Wrap</a> command.</p>
+<p>For example to convert the Postgres driver jar follow the steps below</p>
+<p>$ wget https://github.com/bndtools/bnd/releases/download/2.3.0.REL/biz.aQute.bnd-2.3.0.jar -O bnd.jar $ wget http://jdbc.postgresql.org/download/postgresql-9.3-1101.jdbc41.jar $ cat > bnd.bnd <<EOT Bundle-Version: 9.3.1101 Bundle-SymbolicName: org.postgresql Export-Package: org.postgresql Include-Resource: @postgresql-9.3-1101.jdbc41.jar EOT $ java -jar bnd.jar bnd.bnd</p>
+<p>In the steps above we</p>
+<ol>
+ <li>Download the bnd jar and postgres driver jar</li>
+ <li>Create a bnd file with required instructions.</li>
+ <li>Execute the bnd command</li>
+ <li>Resulting bundle is present in <code>org.postgresql-9.3.1101.jar</code></li>
+</ol>
+<h2>JNDI DataSource</h2>
+<p>While running in Application Server the DataSource instance might be managed by app server and registered with JNDI. To enable lookup of DataSource instance from JNDI you can configure <code>JNDIDataSourceFactory</code></p>
+<ol>
+ <li>Configure the DataSource from OSGi config for PID <code>org.apache.sling.datasource.JNDIDataSourceFactory</code></li>
+ <li>Provide the JNDI name to lookup from and other details</li>
+</ol>
+<p>If Felix WebConsole is used then you can configure it via Configuration UI at http://localhost:8080/system/console/configMgr/org.apache.sling.datasource.JNDIDataSourceFactory</p>
+<p>Once configured <code>JNDIDataSourceFactory</code> would lookup the DataSource instance and register it with OSGi ServiceRegistry</p>
+<h2>Usage</h2>
+<p>Once the required configuration is done the <code>DataSource</code> would be registered as part of the OSGi Service Registry The service is registered with service property <code>datasource.name</code> whose value is the name of datasource provided in OSGi config.</p>
+<p>Following snippet demonstrates accessing the DataSource named <code>foo</code> via DS annotation</p>
+<p>::java import javax.sql.DataSource; import org.apache.felix.scr.annotations.Reference;</p>
+<p>public class DSExample {</p>
+<p>@Reference(target = "(&(objectclass=javax.sql.DataSource)(datasource.name=foo))") private DataSource dataSource; }</p>
+<h2>Installation</h2>
+<p>Download the bundle from <a href="http://sling.apache.org/downloads.cgi">here</a> or use following Maven dependency</p>
+<p>::xml <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.datasource</artifactId> <version>1.0.0</version> </dependency></p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/discovery-api-and-impl.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/discovery-api-and-impl.html b/documentation/bundles/discovery-api-and-impl.html
new file mode 100644
index 0000000..2f4d082
--- /dev/null
+++ b/documentation/bundles/discovery-api-and-impl.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Discovery API and its implementations</h1></header><p>In many situations a particular Sling-based deployment consists of several Sling instances: typically a number of instances would form a <code>cluster</code> that share a common content repository - in other situations, or additionally, instances might be loosely coupled, each with their own repository.</p>
+<p>The <code>discovery-api</code> bundle introduces an abstraction for such scenarios called <code>topology</code>. It provides access to the current topology, allows to be informed of any changes in the topology (such as joining or leaving instances) and contains a simple property exchange mechanism, e.g. to allow building communication services on top of it.</p>
+<p>[TOC]</p>
+<h2>Discovery Entities</h2>
+<p>The Discovery API defines the following entities</p>
+<h3>Instance, InstanceDescription</h3>
+<p>A Sling instance running in one VM is represented in the discovery API by an <code>InstanceDescription</code>:</p>
+<ul>
+ <li>it represents one Sling instance</li>
+ <li>it has thus a unique Sling ID</li>
+ <li>it has a flag that marks if it is leader in a cluster (more details below)</li>
+ <li>plus it has properties (which can be provided via <code>PropertyProviders</code>)</li>
+</ul>
+<h3>Cluster, ClusterView</h3>
+<p>Multiple instances that are connected to the same underlying repository are commonly referred to as a 'Cluster'. The reasoning behind this terminology being that they access the same data and can thus deliver or modify the same data.</p>
+<p>In the discovery API this cluster concept is represented via a <code>ClusterView</code> object. A 'view' because it is a momentary snapshot of the cluster and only contains instances that are currently alive. It's features are:</p>
+<ul>
+ <li>each cluster has a stable leader. Stable meaning it won't change unless that leader crashes.</li>
+ <li>it has an ordered, stable list of instances that are part of it, thus currently alive. the relative order of instances in this list is stable, meaning that it only stays or moves up one position if an instance listed 'above' crashes - a newly started instance will always be added at the end of this list.</li>
+ <li>plus it has a unique id that is persistent across restarts</li>
+</ul>
+<h3>Topology, TopologyView</h3>
+<p>The topology - or more precisely the <code>TopologyView</code> - represents a snapshot (<code>view</code>) of a number of loosely coupled Sling instances (<code>InstanceDescription</code>) and clusters (<code>ClusterView</code>) of a particular deployment. A cluster can consist of one or more instances. Each instance is always part of a cluster (even if the cluster consists of only one instance). The features are:</p>
+<ul>
+ <li>only one: it has a list of clusters</li>
+</ul>
+<p>There are no further assumption made on the structure of a topology.</p>
+<p>If different clusters in the topology should represent different 'types of clusters' (eg a publish or an author cluster), then that is not explicitly handled by the discovery API. Instead, applications can define properties on each instance that model such cluster types or other aspects.</p>
+<h2>Cluster Leader and Instance Ordering</h2>
+<p>As mentioned the discovery API introduces support for a <code>cluster leader</code>: within each cluster, the API guarantees that one and only one instance is leader at any time. That leader is guaranteed to be <code>stable</code>, ie as long as it stays alive and is visible by other instances of the same cluster, it will stay leader. As soon as it leaves the cluster (or the corresponding implementation bundle is deactivated), another instance in that cluster is elected leader. The leader can be used to deal with work that must be guaranteed to only execute on one (but any) instance in the cluster.</p>
+<p>Additionally each cluster (<code>ClusterView</code>) 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.</p>
+<h2>Topology Changes</h2>
+<p>The <code>DiscoveryService</code> provides access to the currently valid <code>TopologyView</code>. Additionally, applications can register a <code>TopologyEventListener</code> and thus be informed about any changes in the topology. Whenever the discovery service detects that an instance is no longer responding or has newly joined, or a new leader has been elected, it sends a <code>TOPOLOGY_CHANGING</code> event, starts settling the change within the topology (i.e. making sure everybody else in the topology agrees with the change) and finally sends a <code>TOPOLOGY_CHANGED</code> event with the new topology.</p>
+<p>Additionally, when "only" properties have changed, a <code>PROPERTIES_CHANGED</code> event is sent.</p>
+<p>Note that the detection of topology (or properties) changes will incur a delay which is implementation dependent.</p>
+<p>The following is an example of a listener. Note that the binding is done automatically by OSGi, as soon as a <code>TopologyEventListener</code> is registered.</p>
+<p>import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Service; import org.apache.sling.discovery.TopologyEvent; import org.apache.sling.discovery.TopologyEventListener;</p>
+<p>@Component @Service(value = { TopologyEventListener.class }) public class MyTopologyEventListener implements TopologyEventListener {</p>
+<p>public void handleTopologyEvent(final TopologyEvent event) { // your code here }</p>
+<p>}</p>
+<h2>Properties</h2>
+<p>The discovery API not only lists all clusters and instances that are part of a topology but also provides a simple mechanism for announcing properties of each instance to the topology, via the <code>PropertyProvider</code> service interface.</p>
+<p>Typical use cases for this are announcements of endpoint URLs or ports such that applications can communicate to other instances in the topology.</p>
+<p>Note that the properties mechanism is not meant be used as a messaging tool: both from an API point of view and the implementation of it are not optimized for frequent changes and its use for messaging is discouraged. It is only meant to be used to announce configuration information for accessing proper messaging services.</p>
+<p>The following is an example of a <code>PropertyProvider</code> that provides <code>sample.value1</code> and <code>sample.value2</code> properties:</p>
+<p>import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Service; import org.apache.sling.discovery.PropertyProvider;</p>
+<p>@Component @Service(value = { PropertyProvider.class }) @Property(name = PropertyProvider.PROPERTY_PROPERTIES, value = {"sample.value1", "sample.value2" }) public class SamplePropertyProvider implements PropertyProvider {</p>
+<p>public String getProperty(final String name) { if ("sample.value1".equals(name)) { return "foo"; } else if ("sample.value2".equals(name)) { return "bar"; } else { return null; } } }</p>
+<h2>Deployment and configuration</h2>
+<p>The discovery API makes no assumptions as to how the instances and clusters discover each other. This is entirely up to the implementations. Some might choose automatic discovery within a LAN using IP multicast, others might choose explicit configuration via a central service etc.</p>
+<h2>discovery.impl: Resource-based, OOTB Implementation</h2>
+<p>The <code>discovery.impl</code> bundle is a resource-based, out of the box implementation of the <code>discovery.api</code> using standard Sling.</p>
+<p>The discovery within a cluster is done by writing heartbeat information into the (common) repository (there's no other form of communication within a cluster). The establishment of a clusterview is done by analyzing these heartbeats, initiating a voting within the cluster (such that each instance can agree that it sees the same number of instances) and by concluding the voting by promoting it as the new "established" view.</p>
+<p>The discovery of instances and clusters outside the local cluster requires explicit configuration of what is termed 'topology connectors', which are HTTP PUTs (see below).</p>
+<h3>Location in Repository</h3>
+<p>Administrative note: All the information about the topology is stored at the following location in the repository:</p>
+<p>/var/discovery/impl</p>
+<h4>/var/discovery/impl/clusterInstances/<slingId></h4>
+<p>Each instance has its own node under <code>clusterInstances/</code> where it stores:</p>
+<ul>
+ <li><code>lastHeartbeat</code>: property, which marks the instance as alive for another <code>heartbeatTimeout</code></li>
+ <li><code>leaderElectionId</code>: an id which is used to determine the leader: the instance with the lowest such leaderElectionId is the leader. Therefore this id is crucial to implement stable leader and ordering. The id contains a prefix (to account for a crx2 edge case where jobs might want to be executed on slave rather than on master), followed by the bundle activate time (to honour stability) and ultimately by the slingId (to have a discriminator should there be multiple instances started at the same time)</li>
+ <li><code>runtimeId</code>: a plain, random UUID that is created fresh upon bundle activation. It is used to detect situations where multiple instances have the same slingId and thus write into the same <code>/var/discovery/impl/clusterInstances/<slingId></code> node.</li>
+ <li><code>slingHomePath</code> and <code>endpoints</code>: these are used for logging purpose only</li>
+</ul>
+<p>Additionally, there are two sub-nodes:</p>
+<ul>
+ <li><code>announcements</code>: this contains announcements of topology connector peers (also see below). An announcement is a json-encoded representation of the sub-tree that the connector peer is aware of and is thereby announcing to this instance. Announcements are sent in both directions of a topology connector. Discovery.impl takes care of filtering out duplicate instances should the structure of topology connectors, and thus these announcements overlap (which is legal)</li>
+ <li><code>properties</code>: contains all properties as specified by registered <code>PropertyProvider</code></li>
+</ul>
+<h4>/var/discovery/impl/establishedView</h4>
+<p>This contains the currently valid, agreed/voted upon cluster view that lists all alive instances:</p>
+<ul>
+ <li>the name of the node directly under <code>establishedView</code> is a unique id of the current incarnation of the cluster view - thus changes whenever an instance joins or leaves or there is a new voting for another reason. ** <code>clusterId</code> : name of the persistent identifier of this cluster. As this is propagated from cluster view to cluster view it stays unchanged forever. ** <code>leaderElectionId</code>: the leaderElectionId that was winning, ie that was lowest ** <code>leaderId</code>: the slingId of the instance that is leader of this cluster view</li>
+ <li><code>members</code>: just an intermediate node containing all alive instances as child nodes</li>
+ <li>child node of <code>members</code>: each child represents a particular alive node (with the name being the slingId) and contains the following properties: ** <code>leaderElectionId</code>: the id that will be used to determine the leader - this value is copied from the corresponding <code>/var/discovery/impl/clusterInstances/<slingId></code> ** <code>initiator</code>: this marks the instance that originally created this voting ** <code>vote</code>: represents this instance's vote, which is true for a voting that got promoted to established view</li>
+</ul>
+<h4>/var/discovery/impl/ongoingVotings</h4>
+<p>This area is used for voting. Each instance can initiate a voting when it realizes that the live instances - denominated by those instances that have a not-yet-timed-out heartbeat property - does not match with the <code>establishedView</code>.</p>
+<p>Once a voting gets a yes vote by all instances it is promoted (moved) under <code>establishedView</code> by the initiating instance. Each establishedView was once a voting, thus the structure is the same as described above.</p>
+<h4>/var/discovery/impl/previousView</h4>
+<p>The instance that promotes its winning voting to <code>establishedView</code> first moves what was there before under <code>previousView</code>. This is purely for debugging and not used anywhere, it just represents a persistet history of previous views of length 1.</p>
+<h3>Heartbeats, Voting and Intra-Cluster Discovery</h3>
+<p><code>discovery.impl</code> uses the fact that all instance of a cluster are connected to the same repository as the basis for discovering those instances. It does so by using a heartbeat and voting mechanism:</p>
+<ul>
+ <li>each instance periodically stores a 'heartbeat' into the repository in a well-known location. This is done by setting a corresponding <code>lastHeartbeat</code> property to the current timestamp</li>
+ <li>a 'heartbeat' that has not yet timed out is considered a signal that the instance is alive</li>
+ <li>as soon as a 'heartbeat' is timed out, the assumption is that the corresponding instance is dead/shutdown</li>
+</ul>
+<p>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.</p>
+<ul>
+ <li>as soon as any instance notices a change in the list of active instances, it is free to calculate a new such list and start a voting in the cluster - each voting carries a unique votingId</li>
+ <li>since any instance can do this, you can have concurrent creation of new votings</li>
+ <li>each instance has one 'yes' vote - and if there are multiple concurrent votings the lowest one wins</li>
+ <li>when a voting receives a 'yes' from all instances that it enlists it is considered as 'winning' and is promoted to be the new, valid view from now on.</li>
+ <li>a promoted view is stored in <code>/var/discovery/impl/establishedView</code> and any change therein is passed on in a TopologyEvent to all registered listeners.</li>
+</ul>
+<h3>pseudo-network partitioning aka split-brain</h3>
+<p><code>discovery.impl</code> requires the, eventually consistent, underlying repository to propagate changes within reasonable time: in less than the configured heartbeat timeout. If heartbeats for some reason are not becoming visible by peers in the cluster within that time, <code>discovery.impl</code> will consider that peer instance as dead. At which point it will first send a TOPOLOGY_CHANGING event to all listeners to make them aware that something is changing in the topology, and then start a new voting. Once the voting concludes a TOPOLOGY_CHANGED event will follow.</p>
+<p>Given the voting is happening through the repository as well, one could imagine a situation where the repository delays can cause a topology to be "pseudo partitioned" into two or more parts, each one agreeing on a set of instances in that sub-cluster (one requirement for such a scenario being that the delays must be asymmetric, ie changes from a subset of instances propagate slow, while the remaining changes propagate fast - ie. two different sets of delays in the cluster). Such a situation would only last as long as the repository delays are large (larger than the heartbeat timeouts). Exact cases where the repository experiences large delays depend of course on the repository configuration and deployment details, known cases include for example long running queries, large set of changes, large set of commits and long-running session.saves.</p>
+<p>The following is an illustration of the impact of large cluster delays:</p>
+<p>![discovery.impl split brain](discovery-impl-split-brain.png =360x)</p>
+<p>In discovery.impl 1.2.2 several improvements have been done to avoid pseudo-network partitioning including the following: (see SLING-3432 for more in-depth details)</p>
+<ul>
+ <li>SLING-5195 : monitor the HeartbeatHandler for long-running session.saves.</li>
+ <li>SLING-5280 : reduce synchronization for HeartbeatHandler to avoid other threads blocking it</li>
+ <li>SLING-5030 : avoid "isolated mode" and replace it with larger TOPOLOGY_CHANGING phase</li>
+</ul>
+<p>All of the above greatly reduce the likelyhood of pseudo-network partitioning with <code>discovery.impl</code>, however, as also described in SLING-4640, there is still a small time-window in which it cannot be ruled out entirely. The successor of discovery.impl, the <code>discovery.oak</code> bundle, addresses these concerns to avoid pseudo-network partitioning alltogether.</p>
+<p>In the context of <code>discovery.impl</code> it is therefore paramount that the underlying repository is monitored and optimized such that the delays are well under control and do not exceed the configured heartbeat timeout.</p>
+<h3>Topology Connectors for Cross-Cluster Discovery</h3>
+<p>From a discovery API's point of view a cluster consists of all instances that are connected to the same repository. The above described built-in mechanism of storing a lastHeartbeat property into the (shared) repository, of voting on changes and creating an explicit establishedView results in automatic discovery within a cluster. There is therefore no further configuration needed for discovering instances in the same cluster.</p>
+<p>However, for discovering multiple clusters such an automatic discovery is not possible and the clusters need to be explicitly configured using (cross-cluster) topology connectors:</p>
+<p>A topology connector is a periodically issued HTTP PUT that announces the part of the topology known to the sending instance to the receiving instance and vica-verca the receiving instance announces its part of the topology to the sender in the response of the very same HTTP PUT. This way whatever other clusters are connected to sender or receiver will be made known to each other. Such a 'topology announcement' will be valid either until the same sender sends the announcement again (which it does periodically) - or until it times out (configurable). A topology connector is by definition always between clusters, never within the same cluster. Topology connectors can be structured in an arbitrary way (chain, star, tree, etc) with the only important point to note here that since changes in the topology propagate through these topology connectors they have a certain delay (namely the configured heartbeatInterval per hop).</p>
+<p>Topology connectors are configured at <a href="http://localhost:8888/system/console/configMgr/org.apache.sling.discovery.impl.Config">/system/console/configMgr/org.apache.sling.discovery.impl.Config</a>. They use the same interval and timeout as the repository heartbeats (heartbeatInterval and heartbeatTimeout).</p>
+<h3>WebConsole</h3>
+<p>A Felix WebConsole plugin at <a href="http://localhost:8888/system/console/topology">/system/console/topology</a> provides a (read-only) overview of the topology.</p>
+<h3>Configuration</h3>
+<p>The following properties can be configured (at <a href="http://localhost:8888/system/console/configMgr/org.apache.sling.discovery.impl.Config">/system/console/configMgr/org.apache.sling.discovery.impl.Config</a>):</p>
+<ul>
+ <li>
+ <p>heartbeatInterval: the time in seconds between two heartbeats (both cluster-internal and for HTTP-connectors). Default value is 15 seconds.</p></li>
+ <li>
+ <p>heartbeatTimeout: the time in seconds after which an instance is considered dead if no heartbeat was sent since. Default value is 20 seconds.</p></li>
+ <li>
+ <p>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).</p></li>
+ <li>
+ <p>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.</p></li>
+ <li>
+ <p>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.</p></li>
+ <li>
+ <p>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.</p></li>
+ <li>
+ <p>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).</p></li>
+ <li>
+ <p>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.</p></li>
+ <li>
+ <p>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.</p></li>
+ <li>
+ <p>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.</p></li>
+</ul>
+<h2>discovery.oak: Oak-based, OOTB-implementation</h2>
+<p>When running discovery.impl ontop of an eventually consistent repository (such as documentMK of oak), the heartbeat mechanism becomes unreliable. The eventual-ness of the repository has an inherent problem in that it doesn't guarantee by when a change initiated from instance A is visible by instance B. And when there are no hard guarantees, it becomes impossible to choose a <code>heartbeatTimeout</code> that works for all eventualities.</p>
+<p>Therefore it becomes necessary to be able to store heartbeats in a (low-level) location that provides higher consistency (than eventualness). Such a 'low-level location' is the DocumentStore of oak (which is an internal API of the DocumentNodeStore). Turns out that the DocumentNodeStore already has a heartbeat-like concept called leases. Those can be re-used for discovery to fulfill the same aspect as heartbeats do: indicate alive instances. This can further be combined with an explicit materialization of a "cluster view" in the DocumentStore so that all instances agree and refer to the same view without the actual need for voting (this is possible since the DocumentStore allows to do conditional updates).</p>
+<h3>Jackrabbit Oak's discovery-lite</h3>
+<p>All of the above mentioned features have been implemented in so-called 'discovery-lite': Discovery-lite is a simplified version of discovery on the oak level. Other than the discovery API it only provides one thing, and that's the clusterview-json:</p>
+<h4>'oak.discoverylite.clusterview'</h4>
+<p>The discovery-lite descriptor <code>oak.discoverylite.clusterview</code> is a shrink-wrapped json-formatted object representing the current state of the cluster. It contains the following:</p>
+<ul>
+ <li><code>active</code>: a list of active nodes in the documentNodeStore cluster</li>
+ <li><code>deactivating</code>: a list of nodes that are in the process of being deactivated</li>
+ <li><code>inactive</code>: a list of nodes that are inactive</li>
+ <li><code>me</code>: the id (number) of the local instance (which is always part of the active nodes)</li>
+ <li><code>id</code>: the id (unique, persistent) of the cluster (which thus survives node/cluster restarts)</li>
+ <li><code>seq</code>: a sequence number that is incremented upon each change in this descriptor (to be able to identify a change even if the other values are unchanged) and shared amongst all instances in the cluster, ie all instances see the same sequence number. This number can thus be used by upper layers to identify this particular incarnation of clusterview.</li>
+ <li><code>final</code>: when this flag is <code>false</code> it indicates that the sequence number has changed (as well as eg <code>active</code> and <code>inactive</code>), but that the local instance has not yet fully processed this changed on a low-level. I.e. it marks that the local instance has not yet read the entire back-log of another, deactivating instance. Thus when <code>final==false</code>, the upper layers should wait until <code>final==true</code>, at which point they know oak has finished processing an instance crashing/shutting down.</li>
+</ul>
+<h4>Accessing discovery-lite</h4>
+<p>The <code>oak.discoverylite.clusterview</code> descriptor is exposed as a JCR repository descriptor and can be accessed like so:</p>
+<p>getRepository().getDescriptor("oak.discoverylite.clusterview")</p>
+<p>which will return the json-formatted clusterview as described above.</p>
+<p>Note however, that this API is not meant to be a public, stable API and changes will be done without prior notice. It is merely an internal information exposed by oak and not standardized nor guaranteed to remain supported or unchanged!</p>
+<h3>Sling's discovery.oak</h3>
+<p>discovery.oak is a implementation of the discovery API that now makes use of this new discovery-lite descriptor in oak. It basically delegates the detection of the instances in the local cluster to discovery-lite. To do so, it periodically reads this descriptor (which is designed to be read at a high-frequency without problems) and triggers <code>TopologyEvents</code> when this descriptor changes.</p>
+<p>The advantage of using discovery-lite (which uses oak leases) instead of writing heartbeats into the repository is that discovery.oak thus becomes independent of the speed/latency that the repository can produce under high load. The discovery-lite should be entirley resilient to high load, thus is discovery.oak.</p>
+<p>Additionally, it reuses functionality from discovery.impl, such as the way properties (from <code>PropertyProviders</code>) or cross-cluster topology announcements (via topology connectors) are handled.</p>
+<p>In order to do this, the discovery.impl bundle has been refactored as follows:</p>
+<h4>discovery.commons</h4>
+<p>This is a bundle usable by any implementation of discovery and contains very basic, implementation-independent functionality</p>
+<h4>discovery.base</h4>
+<p>This is the base bundle solely used by discovery.impl and discovery.oak and contains exactly the mentioned properties and announcement handling.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/dynamic-includes.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/dynamic-includes.html b/documentation/bundles/dynamic-includes.html
new file mode 100644
index 0000000..413bc11
--- /dev/null
+++ b/documentation/bundles/dynamic-includes.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Apache Sling Dynamic Include</h1></header><p>Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>
+<h1>Sling Dynamic Include (org.apache.sling.dynamic-include)</h1>
+<p>For now the Sling Dynamic Include documentation can be found <a href="https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/sling-dynamic-include/README.md">in the Sling codebase</a> or <a href="https://github.com/apache/sling/tree/trunk/contrib/extensions/sling-dynamic-include">on our GitHub mirror</a> if that's in sync.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/file-installer-provider.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/file-installer-provider.html b/documentation/bundles/file-installer-provider.html
new file mode 100644
index 0000000..8e1a489
--- /dev/null
+++ b/documentation/bundles/file-installer-provider.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>File Installer Provider</h1></header><p>The file installer provider scans configured directories and provides the found artifacts (files) to the <a href="/documentation/bundles/osgi-installer.html">OSGI installer</a>. The functionality is very similar to Apache Felix FileInstall, with the major difference that this service implements just the task of scanning a file directory. All the management logic is implemented in the OSGi installer and support of various artifact types like bundles, configurations or custom formats is implemented by plugins for the OSGi installer.</p>
+<h2>Setup</h2>
+<p>The file installer can be configured with these framework (system) properties:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Property</th>
+ <th>Default</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>sling.fileinstall.dir</code></td>
+ <td> </td>
+ <td>The name/path of the directories to watch. Several directories can be specified by using a comma separated list. Each directory might have arbitrarily many sub directories (even nested ones) which may contain the artifacts</td>
+ </tr>
+ <tr>
+ <td><code>sling.fileinstall.interval</code></td>
+ <td>5000 ms</td>
+ <td>Number of milliseconds between 2 polls of the directory</td>
+ </tr>
+ <tr>
+ <td><code>sling.fileinstall.writeback</code></td>
+ <td>true</td>
+ <td>If the file provider supports writeback of changed artifacts, e.g. if a configuration is changed through Config Admin the change is written back to the file system.</td>
+ </tr>
+ </tbody>
+</table>
+<h2>Bundles</h2>
+<p>Bundles are supported by the OSGi installer. If a bundle jar is added to a scanned directory, this bundle is installed. If the file is updated/changed, the bundle is updated. If the file is removed, the bundle gets removed. Of course, these are the simple rules. The actual action depends by the overall state of the system and is controlled by the OSGi installer. For example if already the same bundle with a higher version is installed, when a bundle is dropped into the install folder, the OSGi installer will perform no operation.</p>
+<p>Start levels are supported as well by creating a directory with the name of the start level within the scan directory and putting the bundles within this directory. For example, if the <code>install</code> folder is scanned, the bundle <code>install/3/mybundle.jar</code> will be installed with start level 3. Without such a directory the default start level is used.</p>
+<h2>Configurations</h2>
+<p>Configurations are handled by the <a href="/documentation/bundles/configuration-installer-factory.html">Configuration Installer Factory</a>. The different formats are described there.</p>
+<h2>Custom Artifacts</h2>
+<p>Custom artifacts are handled by the OSGi installer depending on the installed plugins. Have a look at the OSGi installer and its plugins for more information.</p>
+<h2>Runmode Support</h2>
+<p>The file installer supports run modes for installing artifacts (added with <a href="https://issues.apache.org/jira/browse/SLING-4478">SLING-4478</a>). 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 <code>install.a1.dev</code> are only taken into account if the run modes <code>a1</code> and <code>dev</code> are both active.</p>
+<p>You can even combine start level and run mode support. Just pay attention that the run mode foldername must be set on a direct child folder of <code>sling.fileinstall.dir</code> while the start level must be set directly on the parent folder of the artifact you want to install. E.g. <code><sling.fileinstall.dir>/install.a1.dev/3/mybundle.jar</code> will only be considered if both run modes <code>a1</code> and <code>dev</code> are set. If this is the case then the according artifact will be installed in start level 3.</p>
+<h1>Project Info</h1>
+<ul>
+ <li>File installer provider (<a href="http://svn.apache.org/repos/asf/sling/trunk/installer/providers/file">org.apache.sling.installer.provider.file</a>)</li>
+</ul></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
[49/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html b/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html
new file mode 100644
index 0000000..53be8bd
--- /dev/null
+++ b/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html
@@ -0,0 +1,832 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Manipulating Content - The SlingPostServlet (servlets.post)</h1></header><p>[TOC]</p>
+<h2>Multiple Ways to Modify Content</h2>
+<p>As always in life there is more than one way to do it. So to modify content in a JCR repository underlying Sling, you have multiple options, two of which are WebDAV and the Sling default POST Servlet also called the <em>SlingPostServlet</em>. This page is about how you can modify - create, modify, copy, move, delete, import - content through the <em>SlingPostServlet</em>. In addition it also explains how to extend the SlingPostServlet with new operations.</p>
+<p>What is Content anyway? In the following discussion, I use the terms <em>Content</em> and <em>Item</em> interchangeably. With <em>Content</em> I just mean some data to be stored in the JCR repository to be later used as the basis for some presentation. In this sense <em>Content</em> is a rather conceptual term. <em>Item</em> is the name of the parent interface of the JCR <em>Node</em> and <em>Property</em> interfaces. When speaking of <em>Items</em> we mean some actual data stored in the repository ignoring whether the data is actually stored as a <em>Node</em> with child nodes and properties or just a single <em>Property</em>.</p>
+<h2>Quickstart: Creating Content</h2>
+<p>To create content you simply send an HTTP POST request using the path of the node to store the content in and include the actual content as request parameters. So one possibility to do just that is by having an HTML Form like the following:</p>
+<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>
+<p>This simple form will set the <code>title</code> and <code>text</code> properties on a node at <code>/some/new/content</code>. If this node does not exist it is just created otherwise the existing content would be modified.</p>
+<p>Similarly, you can do this using the <code>curl</code> command line tool:</p>
+<p>$ curl -Ftitle="some title text" -Ftext="some body text content" http://host/some/new/content</p>
+<p>You might want to use a specific JCR node type for a newly created node. This is possible by simply setting a <code>jcr:primaryType</code> property on the request, e.g.</p>
+<p>$ curl -F"jcr:primaryType=nt:unstructured" -Ftitle="some title text" -Ftext="some body text content" http://host/some/new/content</p>
+<p>Similarly, you may assign JCR mixin node types using the <code>jcr:mixinTypes</code> property and a Sling resource type using the <code>sling:resourceType</code> property. For example:</p>
+<p>$ curl -F"sling:resourceType=sling:sample" -Ftitle="some title text" -Ftext="some body text content" http://host/some/new/content</p>
+<h2>Preface: multipart/form-data POSTs</h2>
+<p>Sometimes you might want to have the content modifications applied in a certain order. This is particularly interesting if you use fields to create child nodes and if you want to stipulate a certain child node order based on the form fields.</p>
+<p>In this case, ensure you are submitting the POST request using <code>multipart/form-data</code> encoding. This preserves the order of parameter application according to the original HTML form. To this avail, ensure to always include the <code>enctype="multipart/form-data"</code> attribute with the <code><form></code> tag.</p>
+<p>This support requires Sling Engine 2.1.0 and the Sling Default Post Servlet 2.0.6.</p>
+<h2>SlingPostServlet Operations</h2>
+<p>The SlingPostServlet is actually just a front-end to the actual operations. To select the actual operation to execute, the <code>:operation</code> request parameter is used. Out of the box, the SlingPostServlet supports the following operations:</p>
+<ul>
+ <li>property not set or empty -- Create new content or modify existing content</li>
+ <li><code>delete</code> -- Remove existing content</li>
+ <li><code>move</code> -- Move existing content to a new location</li>
+ <li><code>copy</code> -- Copy existing content to a new location</li>
+ <li><code>import</code> -- Import content structures from JSON/XML/Zip</li>
+ <li><code>nop</code> -- Explicitly requests to do nothing and just sets the response status</li>
+ <li><code>checkin</code> - Check in a versionable node</li>
+ <li><code>checkout</code> - Check out a versionable node</li>
+</ul>
+<p>All these operations always operate on the resource of the request as returned by <code>SlingHttpServletRequest.getResource()</code>. Some operations require additional parameters to be set to operate completely.</p>
+<p>Please note that operations are mutually exclusive. For a single POST request only one operation may be executed. Operations also only consume the request parameters as described below. Any excess parameters are silently ignored.</p>
+<div class="note">
+<b>Automated tests</b>:
+Note that the `launchpad/testing` module contains a number of <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/post/">integration tests</a> for the SlingPostServlet. Most of these tests are fairly readable, and can be used to find out more details about the servlet's behavior.
+</div>
+<div class="note">
+<b>Trailing star in the :applyTo parameter</b>:
+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.
+</div>
+<h3>Content Creation or Modification</h3>
+<p>The simplest and most common use case, probably, is content creation and modification. We already saw an example above in the quickstart section. In this section we elaborate more on the concrete stuff.</p>
+<p>First, the request URL indicates the actual repository node to be handled. If the URL addresses an existing node, the request parameters just provide values for the properties to be set on the existing node.</p>
+<p>If the resource of the request is a synthetic resource, e.g. <code>NonExistingResource</code> or <code>StarResource</code>, a new item is created. The path (including name) of the item to be created is derived from the resource path:</p>
+<ul>
+ <li>If the resource path ends with a <code>/*</code> or <code>/</code> the name of the item is automatically created using a name creation algorithm taking into account various request parameters.</li>
+ <li>Otherwise the resource path is used as the path and name of the new item.</li>
+</ul>
+<p>In both cases the path may still include selectors and extensions, which are cut off the path before finding out, what to do.</p>
+<p>To illustrate this algorithm, lets look at some examples (and check the <a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletCreateTest.java"><code>PostServletCreateTest</code></a> in case of doubt):</p>
+<table>
+ <thead>
+ <tr>
+ <th>Resource Path </th>
+ <th>Item path </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>/content/new</code> </td>
+ <td><code>/content/new</code> </td>
+ </tr>
+ <tr>
+ <td><code>/content/new.html</code> </td>
+ <td><code>/content/new</code> </td>
+ </tr>
+ <tr>
+ <td><code>/content/new.print.a4.html</code> </td>
+ <td><code>/content/new</code> </td>
+ </tr>
+ <tr>
+ <td><code>/content/</code> </td>
+ <td><code>/content/xxx</code> where <code>xxx</code> is a generated name </td>
+ </tr>
+ <tr>
+ <td><code>/content/*</code></td>
+ <td><code>/content/xxx</code> where <code>xxx</code> is a generated name </td>
+ </tr>
+ <tr>
+ <td><code>/content/*.html</code></td>
+ <td><code>/content/xxx</code> where <code>xxx</code> is a generated name </td>
+ </tr>
+ <tr>
+ <td><code>/content/*.print.a4.html</code></td>
+ <td><code>/content/xxx</code> where <code>xxx</code> is a generated name </td>
+ </tr>
+ </tbody>
+</table>
+<h5>Setting Property Values</h5>
+<p>Setting property values is as simple as just adding a request parameter whose name is the name of the property to be set and whose value is the value to be assigned to the property. We already saw how to do this in the quick start examples above.</p>
+<p>Here is another example show a simple HTML form to create a new node with an automatically created name:</p>
+<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>
+<p>If this form is submitted with <em>title</em> and <em>This is some Text</em> as values for the <code>title</code> and <code>text</code> fields respectively, a new node is created at the path <code>/content/page/first</code> and the <code>title</code> and <code>text</code> properties set to the respective field values. If a node at <code>/content/page/first</code> already existed before submitting the form, the <code>title</code> and <code>text</code> properties are just updated to the new values from the form fields.</p>
+<p>If a parameter has multiple values, the respective property will be created as a multi-value property. So for example the command line:</p>
+<p>$ curl -Fmulti=one -Fmulti=two http://host/content/page</p>
+<p>Would assign the <code>/content/page/multi</code> property the value <em>[ "one", "two" ]</em>.</p>
+<p>This is pretty much all there is to know about creating and modifying content. The following sections will now introduce more functionality which help you with more fine-grained control in your content management application.</p>
+<h5>Automatic property values: last modified and created by</h5>
+<p>To make it easier to set "last modified" and "created by" property values from POST requests, values are generated automatically for the following property names <em>if they are supplied with empty values in such a request</em>:</p>
+<ul>
+ <li>
+ <p><code>created</code> and <code>jcr:created</code> are set to the node creation time, as a Date value.</p></li>
+ <li>
+ <p><code>lastModified</code>, <code>jcr:lastModified</code> are set to the node modification time, as a Date value.</p></li>
+ <li>
+ <p><code>createdBy</code> and <code>jcr:createdBy</code> are set to the name of the user who created the node.</p></li>
+ <li>
+ <p><code>lastModifiedBy</code>, <code>jcr:lastModifiedBy</code> are set to the name of the user who modified the node.</p></li>
+</ul>
+<p>This is demonstrated by the <a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/SlingAutoPropertiesTest.java">SlingAutoPropertiesTest</a> which is part of our launchpad integration tests.</p>
+<h5>File Uploads</h5>
+<p>File uploads are typically done using the <code><input type="file""/></code> 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:</p>
+<ul>
+ <li><code>jcr:data</code> -- The actual file contents</li>
+ <li><code>jcr:lastModified</code> -- The time stamp of processing the uploaded file</li>
+ <li><code>jcr:mimeType</code> -- The MIME type from the original file submission (if contained in the file body part) or derived from the original file name</li>
+</ul>
+<p>The name of the node is either taken from the parameter name or if the name is <code>*</code> from the name of the uploaded file.</p>
+<p>The primary node type of the uploaded file is selected using the following algorithm:</p>
+<ul>
+ <li>If a `@TypeHint suffixed parameter (see below for a description) is present check whether the value is a known non-mixin node type. If so, the node is created with this primary node type.</li>
+ <li>If a <code>@TypeHint</code> suffixed parameter is not present or the value does not denote an existing non-mixin node type, the node will be created as an <code>nt:file</code> node if the parent node is of type <code>nt:folder</code>. Otherwise the node will be created with primary node type <code>nt:resource</code>.</li>
+</ul>
+<p>If the node to be created is <code>nt:file</code>, the actual file data will really be stored in the <code>jcr:content</code> child node of the new <code>nt:file</code> node whose primary node type is then set as <code>nt:resource</code>.</p>
+<p>Example 1: Upload an image to a node named <code>image</code> below <code>/content/page</code>:</p>
+<form method="POST" action="/content/page" enctype="multipart/form-data">
+<input type="file" name="image" />
+<input type="Submit" />
+</form>
+<p>Example 2: Upload a file as a node of type <code>nt:file</code> below <code>/content/folder</code>:</p>
+<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>
+<p>Assuming the user selected a file named <code>myImage.jpg</code> the uploaded file would be stored in an <code>nt:file</code> node at <code>/content/folder/myImage.jpg</code>.</p>
+<h5>Date properties</h5>
+<p>Parameters providing date/time values to be stored in JCR properties of type <em>Date</em> require special handling. The problem is that there are a number of formats to represent such date/time values. To account for this open-ended list of formats, the Sling Post Servlet supports configurability of the process of parsing strings into <code>Calendar</code> objects.</p>
+<p>The Sling Post Servlet configuration property <code>servlet.post.dateFormats</code> takes a list of format strings which are used to setup <code>java.text.SimpleDateFormat</code> instances for parsing date/time string representations. A special format string <code>ISO8601</code> is supported to indicate the string to be parsed as a JCR standard string representation of a <em>Date</em> property. Only the latter supports storing the actual timezone offset. All the parsers leveraging <code>java.text.SimpleDateFormat</code> loose the given timezone and convert that just to the default timezone of the JRE (when creating the <code>Calendar</code> out of the <code>Date</code>, because <code>java.lang.Date</code> is not carrying any timezone information).</p>
+<p>The default list of configured date/time parse pattern is:</p>
+<ul>
+ <li>EEE MMM dd yyyy HH:mm:ss 'GMT'Z</li>
+ <li>ISO8601, using the org.apache.jackrabbit.util.ISO8601 parser (±YYYY-MM-DDThh:mm:ss.SSSTZD)</li>
+ <li>yyyy-MM-dd'T'HH:mm:ss.SSSZ</li>
+ <li>yyyy-MM-dd'T'HH:mm:ss</li>
+ <li>yyyy-MM-dd</li>
+ <li>dd.MM.yyyy HH:mm:ss</li>
+ <li>dd.MM.yyyy</li>
+</ul>
+<p>Any date/time string parameter supplied is subject to the patterns in the configured order. The first pattern accepting the string and parsing it into a <code>Date</code> -- and thus a <code>Calendar</code> -- object is used. Therefore this list is best ordered in a most-stringent to least-stringent order.</p>
+<h5>Omitting Some Parameters</h5>
+<p>There may be times that you have forms which contain a lot of fields which you do not want to actually store in content. Such forms usually are created using some client-side GUI library which uses the fields for its own purposes. To be able to easily differentiate between real content to be actually stored and such control parameters, you may prefix the names of the fields destined for content with a dot-slash (<code>./</code>).</p>
+<p>As soon as the SlingPostServlet encounters parameters prefixed with dot-slash, only those parameters are considered for content updates while all other parameters not prefixed are just ignored. In addition to dot-slash prefixed parameters, also parameters prefixed with dot-dot-slash (<code>../</code>) and slash (<code>/</code>) are considered in this situation.</p>
+<p>For example, the following form only uses the first two fields for content update and ignores the rest:</p>
+<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>
+<p>Because the SlingPostServlet encounters the <code>./title</code> parameter, only parameters prefixed with dot-slash, dot-dot-slash and slash are considered for content update. In this case this would <code>./title</code> and <code>../first/text</code> while <code>control0</code> and <code>control1</code> are not prefixed and thus ignored.</p>
+<p>Background: The name of the parameters used for content update are actually intended to be relative path names of the properties to modify. So in effect using the field name <code>text</code> is equivalent to <code>./text</code> -- dot-slash meaning relative to the current node identified by the <code>action</code> attribute value for <code>form</code> tag -- or <code>../first/text</code> if <code>first</code> is the name of the node to modify -- dot-dot-slash meaning relative to the parent node of the node identified by the <code>action</code> attribute value of the <code>form</code> tag.</p>
+<p>In addition to the mechanism explained here, the following parameters are also ignored:</p>
+<ul>
+ <li>Parameters whose name start with a colon (<code>:</code>) are always ignored by the SlingPostServlet with respect to content update. The reason is that the prefixing colon is intended as a marker for SlingPostServlet control parameters.</li>
+ <li>The <code>charset</code> request parameter is also never written back because this parameter is used to convey the character encoding used to transport the request parameters.</li>
+ <li>Request parameters matching a regular expression supplied with the <code>servlet.post.ignorePattern</code> configuration parameter are also ignored. By default this pattern is <code>j_.*</code> thus ignoring any request parameters with the prefix <code>j_</code> such as <code>j_username</code>. Those request parameters are generally used for authentication purposes and may hit the Sling POST Servlet in some situations.</li>
+</ul>
+<h5>Controlling Content Updates with <code>@</code> Suffixes</h5>
+<p>Generally just creating forms with parameters and their values suffices it completely. Sometimes, though, you want to have more control on how the parameter values are actually stored in the properties. For example, you want to set a property to a default value if the user did provide an actual value. Or you might want to store a parameter explicitly with a given data type, such as numeric, boolean etc.</p>
+<p>The SlingPostServlet provides such property control in the form of <code>@</code> suffixed parameters, which are now presented.</p>
+<p>The <code>@</code> suffixed parameters are not used on their own but always in conjunction with a plain parameter. The part of the parameter name before the <code>@</code> suffix is used in this case for correlation and must match exactly the name of the parameter to which the <code>@</code> suffixed parameter belongs.</p>
+<p>For example, the parameter <code>width@TypeHint</code> applies to the <code>width</code> parameter and the <code>./height@TypeHint</code> parameter applies to the <code>./height</code> parameter. As can be seen, the correlation between the parameters is a simple case-sensitive string comparison. That is the <code>widht@TypeHint</code> parameter would not apply to the <code>./width</code> even though both parameters address the same property but they do not have a string match.</p>
+<h6><code>@TypeHint</code></h6>
+<p>Parameters with the <code>@TypeHint</code> suffix may be used to force storing the named parameter in a property with the given type. The value of the <code>@TypeHint</code> parameter, if applied to a parameter for a property, is the JCR property type name. If the <code>@TypeHint</code> parameter is applied to a field upload parameter, the value is used to indicate the JCR primary node type for the node into which the uploaded file is stored.</p>
+<p>If the <code>@TypeHint</code> value ends with <code>[]</code>, it indicates a multi-value property. A multi-value property is usually auto-detected if there are multiple values for the property (i.e. request parameter). But if only a single value is present in the request, the desired property type needs to be explicitly defined as multi-value by stating <code>@TypeHint=<type>[]</code>.</p>
+<p>Example: The following form sets the numeric <code>width</code>, the boolean <code>checked</code>, and the multi-valued <code>hobbys</code> (with 3 values to enter) properties:</p>
+<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>
+<p>In real applications you would need some JavaScript that allows to add/remove values, ie. add/remove inputs with the name "hobbys". Or a pure JavaScript based form post would be used, that gathers the properties to update programmatically, but the additional parameter <code>hobbys@TypeHint=String[]</code> would be the same.</p>
+<p>The <code>@TypeHint</code> suffixed parameter is assumed to be single-valued. If the parameter has multiple values, only the first is actually used.</p>
+<p>For multi-value properties, see also the <code>@Patch</code> option.</p>
+<p>For more information on applying <code>@TypeHint</code> to a file upload parameter see the section on File Uploads above.</p>
+<h6><code>@DefaultValue</code></h6>
+<p>The <code>@DefaultValue</code> suffixed parameter may be provided to set a property to a default value should no value be provided in the actual parameters. Same as for normal parameters, the <code>@DefaultValue</code> parameter may have multiple values to create multi-valued properties.</p>
+<p>Example: Set the <code>text</code> property to a default value if the user does not provide one:</p>
+<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>
+<h6><code>@UseDefaultWhenMissing</code></h6>
+<p>As described above, <code>@DefaultValue</code> only takes effect if no value is provided for a particular parameter. However, in some cases, such as HTML checkboxes, this isn't sufficient because the parameter isn't submitted at all. To handle this scenario, you can use the <code>@UseDefaultWhenMissing</code> suffixed parameter.</p>
+<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>
+<h6><code>@IgnoreBlanks</code></h6>
+<p>Sometimes a form client will supply empty parameter values resulting in content being created or modified. For example submitting this form:</p>
+<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>
+<p>will result in multi-value String property being set to [ "foo", "bar", "" ]. Notice the blank value.</p>
+<p>Likewise submitting this form without a value entered:</p>
+<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>
+<p>will result in the single-value String property being set to an empty string.</p>
+<p>To overcome this situation the <code>@IgnoreBlanks</code> suffix may be used to consider parameters with an empty string value to be ignored during processing. That is such parameter values would be treated as if they would not be supplied.</p>
+<p>Adding</p>
+<input type="hidden" name="stringProperty@IgnoreBlanks" value="true"/>
+<p>to the above forms will cause the multi-value property be set to the two-element value [ "foo", "bar" ] and to not modify the property at all in the second single-value example.</p>
+<h6><code>@ValueFrom</code></h6>
+<p>In some situations, an HTML form with parameters may be reused to update content. But one or more form parameters may not comply with the names expected to be used for properties. In this case a parameter suffixed with <code>@ValueFrom</code> may be set containing the name of the parameter providing the actual data to be used.</p>
+<p>Example: To set the property <code>text</code> from a form element <code>supplied_text</code>, you might use the following form:</p>
+<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>
+<p>To prevent storing the additional parameters in the repository you might want to use the prefixing mechanism as shown in the example above, where the <code>@ValueFrom</code> parameter is prefixed and thus the <code>supplied_text</code> parameter is not used for property setting.</p>
+<p>The <code>@ValueFrom</code> suffixed parameter is assumed to be single-valued. If the parameter has multiple values it is ignored completely.</p>
+<p>The <code>@ValueFrom</code> suffixed parameter is also special in that there must not be a correlated parameter without a suffix. Thus have parameters <code>text</code> and <code>text@ValueFrom</code> may have unexpected results.</p>
+<h6><code>@Delete</code></h6>
+<p>Sometimes it may be required to not set a property to a specific value but to just remove it while processing the content update request. One such situation is a property filled from one or more checkboxes in an HTML form. If none of the checkboxes are checked, no parameter is actually submitted for these checkboxes. Hence the SlingPostServlet will not touch this property and effectively leave it untouched, while the natural reaction would have been to remove the property.</p>
+<p>Here comes the <code>@Delete</code> suffixed parameter. This simply causes the indicated property be removed if it exists. If the property does not exist, nothing more happens. The actual value of the <code>@Delete</code> suffixed parameter does not care as long as the parameter is submitted.</p>
+<p>Example: To ensure the <code>color</code> property is actually removed if no color has been selected, you might use the following form:</p>
+<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>
+<p>The <code>@Delete</code> suffixed parameter is also special in that there need not be a correlated parameter without a suffix. If both -- a parameters <code>text</code> and <code>text@Delete</code> are set, the <code>text</code> property is first deleted and then filled with the new content.</p>
+<p>The <code>@Delete</code> suffixed parameter in fact calls for a sub-operation, which is executed after the node addressed by the request URL is created (if needed) but before any other tasks of content creation and modification are done. Any item -- this may be a property or a node, actually -- addressed by the <code>@Delete</code> suffixed parameter is just removed if it exists. If the item does not exist, nothing happens.</p>
+<h6><code>@MoveFrom</code></h6>
+<p>Now, that your bright and shiny content management application has great Flash-based file upload feature you will want to be able to use the pre-uploaded files for your content with the same request as when you upload other content. For example you might have a node storing some text and an illustration you uploaded as an image file.</p>
+<p>To support this kind of functionality, the <code>@MoveFrom</code> suffixed parameter may be set to the repository path of the node to where you uploaded the image file.</p>
+<p>Example: Your Flash-based file upload stored the file on the server at <code>/tmp/upload/123</code>. You now want to store this file along with a title and a text in a newly created node. The following form will be your friend:</p>
+<!-- trailing slash generates a name for the new node -->
+<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>
+<p>If there exists no repository item at the indicated path, nothing is done. If the item indicated by the <code>@MoveFrom</code> suffixed parameter already exists, it is replaced by the item addressed by the parameter value -- unless of course there is no item at the named location.</p>
+<p>The <code>@MoveFrom</code> suffixed parameter is assumed to be single-valued. If the parameter has multiple values it is ignored completely.</p>
+<p>The <code>@MoveFrom</code> suffixed parameter is also special in that there must not be a correlated parameter without a suffix. Thus have parameters <code>text</code> and <code>text@MoveFrom</code> may have unexpected results.</p>
+<p>The <code>@MoveFrom</code> suffixed parameter in fact calls for a sub-operation, which is executed after the <code>@Delete</code> sub operation but before any other tasks of content creation and modification are done.</p>
+<h6><code>@CopyFrom</code></h6>
+<p>Similar to the <code>@MoveFrom</code> suffix exists a <code>@CopyFrom</code> suffix. The latter works exactly the same as the former except that the item addressed by the parameter value is not moved but just copied.</p>
+<p>Example: Your Flash-based file upload stored the file on the server at <code>/tmp/upload/123</code>. You now want to store this file along with a title and a text in a newly created node. The following form may be your friend:</p>
+<!-- trailing slash generates a name for the new node -->
+<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>
+<p>If there exists no repository item at the indicated path, nothing is done. If the item indicated by the <code>@CopyFrom</code> suffixed parameter already exists, it is replaced by the item addressed by the parameter value -- unless of course there is no item at the named location.</p>
+<p>The <code>@CopyFrom</code> suffixed parameter is assumed to be single-valued. If the parameter has multiple values it is ignored completely.</p>
+<p>The <code>@CopyFrom</code> suffixed parameter is also special in that there must not be a correlated parameter without a suffix. Thus have parameters <code>text</code> and <code>text@CopyFrom</code> may have unexpected results.</p>
+<p>The <code>@CopyFrom</code> suffixed parameter in fact calls for a sub-operation, which is executed after the <code>@MoveFrom</code> sub operation but before any other tasks of content creation and modification are done.</p>
+<h6><code>@Patch</code></h6>
+<p>When modifying multi-value properties, the <code>@Patch</code> suffix can be used to just add <code>+</code> or remove <code>-</code> individual values without overwriting the full array. This allows to change the array without knowing the current values.</p>
+<p>For example, imagine a multi-value string property that stores tags or keywords. To both add a tag "cool" and remove "boring" from the list:</p>
+<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>
+<p>The array will be treated like a set: when adding a value, it will only be added once if it does not exist yet; when removing a value, all occurrences of it will be removed. For values not affected by the add or remove operations, nothing changes. An existing array with duplicate entries will not automatically be converted into a set.</p>
+<p>The format for an individual parameter value is <code><operation><value></code>. If there is no or no valid operation given, this value will be ignored.</p>
+<p>Operation <code>+</code> will add the <code><value></code> to the array if it is not part of it yet.</p>
+<p>Operation <code>-</code> will remove all occurrences of <code><value></code> from the array.</p>
+<p>The value of the <code>@Patch</code> suffixed parameter is irrelevant, it can be empty (example above uses <code>true</code> for clarity).</p>
+<p>All types should be supported via <code>@TypeHint</code>, but it needs to indicate a multi-value property, ending with <code>[]</code>.</p>
+<h5>Algorithm for Node Name Creation</h5>
+<p>If request is posted with an URL ending in slash <code>/</code> or slash-star <code>/*</code>, the SlingPostServlet derives a name for the node to be created upon the request applying the following algorithm:</p>
+<ol>
+ <li>If a <code>:name</code> parameter is supplied, the (first) value of this parameter is used unmodified as the name for the new node. If the name is illegally formed with respect to JCR name requirements, an exception will be thrown when trying to create the node. The assumption with the <code>:name</code> parameter is, that the caller knows what he (or she) is supplying and should get the exact result if possible.</li>
+ <li>Otherwise if a <code>:nameHint</code> parameter is supplied, the (first) value of this parameter is used to generate the node name. A name filtering is applied to this hint to ensure a valid JCR node name.</li>
+ <li>Otherwise a series of request parameters supplied to set content is inspected for a possible name. The list of the names of these parameter is configurable with the SlingPostServlet and defaults to <code>[ title, jcr:title, name, description, jcr:description, abstract ](</code> refs.-title-jcr-title-name-description-jcr-description-abstract.path <code>)</code>. The first request parameter with a non-empty value is used and filtered to get the valid JCR name.</li>
+ <li>Otherwise an ever increasing auto generated number is used. Filtering is also applied to this numeric name.</li>
+</ol>
+<p>The filtering algorithm to create a valid name of the hints from above steps (except the first) works as follows:</p>
+<ul>
+ <li>Convert the proposed name to all lower case.</li>
+ <li>Replace all characters not in the range [0..9a..z*] by a single underscore <code>_</code>.</li>
+ <li>If the name starts with a digit prepend an underscore. Technically names with leading digits are valid, but they present major issues when using such names in JCR XPath expressions. The algorithm takes care to not create names with two or more consecutive underscore characters.</li>
+ <li>Finally the name is cut to a configurable maximum length (default is 20 characters).</li>
+</ul>
+<p>For example the <code>:nameHint</code> value <em>A quick brown Fox ...</em> is filtered to become <em>a_quick_brown_fox_</em>.</p>
+<p>After generating and filtering the name it is further guaranteed that the name is unique: If a node of the same name as just generated from the algorithm already exists below the same parent node a numeric index is appended to the new node name to make it unique.</p>
+<h5>Response Status</h5>
+<p>The modification operation has the following status responses:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Explanation </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>200/OK </td>
+ <td>An existing node has been updated with content </td>
+ </tr>
+ <tr>
+ <td>201/CREATED </td>
+ <td>A new node has been created and filled with content </td>
+ </tr>
+ <tr>
+ <td>500/INTERNAL SERVER ERROR </td>
+ <td>Some exception, for example a <code>RepositoryException</code>, occurred while processing the request </td>
+ </tr>
+ </tbody>
+</table>
+<h3>Content Removal</h3>
+<p>To remove existing content just address the item to be removed and set the <code>:operation</code> parameter to <code>delete</code>. For example the following command line removes the <code>/content/sample</code> page:</p>
+<p>$ curl -F":operation=delete" http://host/content/sample</p>
+<h5>Response Status</h5>
+<p>The delete operation has the following status responses:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Explanation </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>200/OK </td>
+ <td>The resource (and all its descendants) has been removed </td>
+ </tr>
+ <tr>
+ <td>404/NOT FOUND </td>
+ <td>The request URL does not address an existing repository item </td>
+ </tr>
+ <tr>
+ <td>500/INTERNAL SERVER ERROR </td>
+ <td>Some exception, for example a <code>RepositoryException</code>, occurred while processing the request </td>
+ </tr>
+ </tbody>
+</table>
+<h5>Deleting Multiple Items</h5>
+<p>By using the <code>:applyTo</code> request parameter it is possible to remove multiple items in one single request. Deleting items in this way leaves you with less control, though. In addition, if a single item removal fails, no item at all is removed.</p>
+<p>When specifying the item(s) to be removed with the <code>:applyTo</code> parameter, the request resource is left untouched (unless of course if listed in the <code>:applyTo</code> parameter) and only used to resolve any relative paths in the <code>:applyTo</code> parameter.</p>
+<p>To remove the <code>/content/page1</code> and <code>/content/page2</code> nodes, for example, you might use the following command line:</p>
+<p>$ curl -F":operation=delete" -F":applyTo=/content/page1" -F":applyTo=/content/page2" http://host/content/sample</p>
+<p>Using a trailing star in the :applyTo parameter (as mentioned before), you can remove all the children of the <code>/content</code> node, for example, as follows:</p>
+<p>$ curl -F":operation=delete" -F":applyTo=/content/*" http://host/content/sample</p>
+<p>If any resource listed in the <code>:applyTo</code> parameter does not exist, it is silently ignored.</p>
+<h6>Response Status</h6>
+<p>The delete operation applied to multiple resources has the following status responses:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Explanation </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>200/OK </td>
+ <td>All requested and existing resources have been removed </td>
+ </tr>
+ <tr>
+ <td>500/INTERNAL SERVER ERROR </td>
+ <td>Some exception, for example a <code>RepositoryException</code>, occurred while processing the request </td>
+ </tr>
+ </tbody>
+</table>
+<h3>Copying Content</h3>
+<p>To copy existing content to a new location, the <code>copy</code> operation is specified. This operation copies the item addressed by the request URL to a new location indicated by the <code>:dest</code> parameter. The <code>:dest</code> parameter is the absolute or relative path to which the resource is copied. If the path is relative it is assumed to be below the same parent as the request resource. If it is terminated with a <code>/</code> character the request resource is copied to an item of the same name under the destination path.</p>
+<p>To illustrate the <code>:dest</code> parameter handling, lets look at a few examples. All examples are based on addressing the <code>/content/sample</code> item:</p>
+<table>
+ <thead>
+ <tr>
+ <th><code>:dest</code> Parameter </th>
+ <th>Destination Absolute Path </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>/content/newSample</code> </td>
+ <td><code>/content/newSample</code> </td>
+ </tr>
+ <tr>
+ <td><code>different/newSample</code> </td>
+ <td><code>/content/different/newSample</code> </td>
+ </tr>
+ <tr>
+ <td><code>/content/different/</code> </td>
+ <td><code>/content/different/sample</code> </td>
+ </tr>
+ <tr>
+ <td><code>different/</code> </td>
+ <td><code>/content/different/sample</code> </td>
+ </tr>
+ </tbody>
+</table>
+<p>If an item already exists at the location derived from the <code>:dest</code> parameter, the copy operation fails unless the <code>:replace</code> parameter is set to <code>true</code> (case is ignored when checking the parameter value).</p>
+<h5>Response Status</h5>
+<p>The copy operation has the following status responses:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Explanation </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>200/OK </td>
+ <td>The node has been copied to the new location replacing an existing item at the destination </td>
+ </tr>
+ <tr>
+ <td>201/CREATED </td>
+ <td>The node has been copied to the new location creating a new item at the destination </td>
+ </tr>
+ <tr>
+ <td>404/NOT FOUND </td>
+ <td>The request URL does not address an existing repository item </td>
+ </tr>
+ <tr>
+ <td>412/PRECONDITION FAILED </td>
+ <td>An item already exists at the destination and the <code>:replace</code> parameter is not set to <code>true</code> </td>
+ </tr>
+ <tr>
+ <td>500/INTERNAL SERVER ERROR </td>
+ <td>Some exception, for example a <code>RepositoryException</code>, occurred while processing the request </td>
+ </tr>
+ </tbody>
+</table>
+<h5>Copying Multiple Items</h5>
+<p>By using the <code>:applyTo</code> request parameter it is possible to copy multiple items in one single request. Copying items in this way leaves you with less control, though. In addition, if a single item copy fails, no item at all is copied.</p>
+<p>When specifying the item(s) to be copied with the <code>:applyTo</code> parameter, the request resource is left untouched (unless of course if listed in the <code>:applyTo</code> parameter) and only used to resolve any relative paths in the <code>:applyTo</code> parameter.</p>
+<p>To copy the <code>/content/page1</code> and <code>/content/page2</code> nodes to <code>/content/target</code>, for example, use:</p>
+<p>$ curl -F":operation=copy" -F":applyTo=/content/page1" -F":applyTo=/content/page2" -F":dest=/content/target/" http://host/content/sample</p>
+<p>Please note the trailing slash character (<code>/</code>) in the value of the <code>:dest</code> parameter. This is required for multi-item copy operations using the <code>:applyTo</code> parameter. The copied items are created below the node indicated by the <code>:dest</code>.</p>
+<p>Using a trailing star in the :applyTo parameter (as mentioned before), you can copy all the children of the <code>/content</code> node, for example, as follows:</p>
+<p>$ curl -F":operation=copy" -F":applyTo=/content/*" -F":dest=/content/target/" http://host/content/sample</p>
+<p>If any resource listed in the <code>:applyTo</code> parameter does not exist, it is silently ignored. Any item already existing at the copy destination whose name is the same as the name of an item to be copied is silently overwritten with the source item.</p>
+<h6>Response Status</h6>
+<p>The copy operation applied to multiple resources has the following status responses:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Explanation </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>200/OK </td>
+ <td>All requested and existing resources have been copied </td>
+ </tr>
+ <tr>
+ <td>412/PRECONDITION FAILED </td>
+ <td>The node indicated by the <code>:dest</code> parameter does not exist </td>
+ </tr>
+ <tr>
+ <td>500/INTERNAL SERVER ERROR </td>
+ <td>Some exception, for example a <code>RepositoryException</code>, occurred while processing the request. This status is also set if the <code>:dest</code> parameter value does not have a trailing slash character. </td>
+ </tr>
+ </tbody>
+</table>
+<h3>Moving Content</h3>
+<p>To move existing content to a new location, the <code>move</code> operation is specified. This operation moves the item addressed by the request URL to a new location indicated by the <code>:dest</code> parameter. The <code>:dest</code> parameter is the absolute or relative path to which the resource is moved. If the path is relative it is assumed to be below the same parent as the request resource. If it is terminated with a <code>/</code> character the request resource is moved to an item of the same name under the destination path.</p>
+<p>To illustrate the <code>:dest</code> parameter handling, lets look at a few examples. All examples are based on addressing the <code>/content/sample</code> item:</p>
+<table>
+ <thead>
+ <tr>
+ <th><code>:dest</code> Parameter </th>
+ <th>Destination Absolute Path </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>/content/newSample</code> </td>
+ <td><code>/content/newSample</code> </td>
+ </tr>
+ <tr>
+ <td><code>different/newSample</code> </td>
+ <td><code>/content/different/newSample</code> </td>
+ </tr>
+ <tr>
+ <td><code>/content/different/</code> </td>
+ <td><code>/content/different/sample</code> </td>
+ </tr>
+ <tr>
+ <td><code>different/</code> </td>
+ <td><code>/content/different/sample</code> </td>
+ </tr>
+ </tbody>
+</table>
+<p>If an item already exists at the location derived from the <code>:dest</code> parameter, the move operation fails unless the <code>:replace</code> parameter is set to <code>true</code> (case is ignored when checking the parameter value).</p>
+<h5>Response Status</h5>
+<p>The move operation has the following status responses:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Explanation </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>200/OK </td>
+ <td>The node has been moved to the new location replacing an existing item at the destination </td>
+ </tr>
+ <tr>
+ <td>201/CREATED </td>
+ <td>The node has been moved to the new location creating a new item at the destination </td>
+ </tr>
+ <tr>
+ <td>404/NOT FOUND </td>
+ <td>The request URL does not address an existing repository item </td>
+ </tr>
+ <tr>
+ <td>412/PRECONDITION FAILED </td>
+ <td>An item already exists at the destination and the <code>:replace</code> parameter is not set to <code>true</code> </td>
+ </tr>
+ <tr>
+ <td>500/INTERNAL SERVER ERROR </td>
+ <td>Some exception, for example a <code>RepositoryException</code>, occurred while processing the request </td>
+ </tr>
+ </tbody>
+</table>
+<h5>Moving Multiple Items</h5>
+<p>By using the <code>:applyTo</code> request parameter it is possible to move multiple items in one single request. Moving items in this way leaves you with less control, though. In addition, if a single item move fails, no item at all is moved.</p>
+<p>When specifying the item(s) to be moved with the <code>:applyTo</code> parameter, the request resource is left untouched (unless of course if listed in the <code>:applyTo</code> parameter) and only used to resolve any relative paths in the <code>:applyTo</code> parameter.</p>
+<p>To for example move the <code>/content/page1</code> and <code>/content/page2</code> nodes to <code>/content/target</code>, you might use the following command line:</p>
+<p>$ curl -F":operation=move" -F":applyTo=/content/page1" -F":applyTo=/content/page2" -F":dest=/content/target/" http://host/content/sample</p>
+<p>Please note the trailing slash character (<code>/</code>) in the value of the <code>:dest</code> parameter. This is required for multi-item move operations using the <code>:applyTo</code> parameter. The moved items are created below the node indicated by the <code>:dest</code>.</p>
+<p>Using a trailing star in the :applyTo parameter (as mentioned before), you can move all the children of the <code>/content</code> node, for example, as follows:</p>
+<p>$ curl -F":operation=move" -F":applyTo=/content/*" -F":dest=/content/target/" http://host/content/sample</p>
+<p>If any resource listed in the <code>:applyTo</code> parameter does not exist, it is silently ignored. Any item already existing at the move destination whose name is the same as the name of an item to be moved is silently overwritten with the source item.</p>
+<h6>Response Status</h6>
+<p>The move operation applied to multiple resources has the following status responses:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Explanation </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>200/OK </td>
+ <td>All requested and existing resources have been moved </td>
+ </tr>
+ <tr>
+ <td>412/PRECONDITION FAILED </td>
+ <td>The node indicated by the <code>:dest</code> parameter does not exist </td>
+ </tr>
+ <tr>
+ <td>500/INTERNAL SERVER ERROR </td>
+ <td>Some exception, for example a <code>RepositoryException</code>, occurred while processing the request. This status is also set if the <code>:dest</code> parameter value does not have a trailing slash character. </td>
+ </tr>
+ </tbody>
+</table>
+<h3>Importing Content Structures</h3>
+<p>To import content structures just address the parent item to import into and set the <code>:operation</code> parameter to <code>import</code>.</p>
+<p>The optional name of the root node of the imported content may optionally be supplied using the <a href="#algorithm-for-node-name-creation">Algorithm for Node Name Creation</a>.</p>
+<p>Other parameters for the import operation:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Parameter </th>
+ <th>Required </th>
+ <th>Default value </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>:contentType</code> </td>
+ <td><code>true</code> </td>
+ <td> </td>
+ <td>The <code>:contentType</code> value specifies the type of content being imported. Possible values are: xml, jcr.xml, json, jar, zip </td>
+ </tr>
+ <tr>
+ <td><code>:content</code> </td>
+ <td><code>false</code> </td>
+ <td> </td>
+ <td>The <code>:content</code> 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. </td>
+ </tr>
+ <tr>
+ <td><code>:contentFile</code> </td>
+ <td><code>false</code> </td>
+ <td> </td>
+ <td>The <code>:contentFile</code> 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. </td>
+ </tr>
+ <tr>
+ <td><code>:checkin</code> </td>
+ <td><code>false</code> </td>
+ <td>false </td>
+ <td>The <code>:checkin</code> value specifies whether versionable nodes should be checked in during the import. </td>
+ </tr>
+ <tr>
+ <td><code>:autoCheckout</code> </td>
+ <td><code>false</code> </td>
+ <td>false </td>
+ <td>The <code>:autoCheckout</code> value specifies whether versionable nodes should be checked out when necessary during the import. </td>
+ </tr>
+ <tr>
+ <td><code>:replace</code> </td>
+ <td><code>false</code> </td>
+ <td>false </td>
+ <td>The <code>:replace</code> 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. </td>
+ </tr>
+ <tr>
+ <td><code>:replaceProperties</code> </td>
+ <td><code>false</code> </td>
+ <td>false </td>
+ <td>The <code>:replaceProperties</code> value specifies whether the import should replace properties if they already exist. </td>
+ </tr>
+ </tbody>
+</table>
+<p>For example the following command line imports the <code>/content/sample</code> page:</p>
+<p>$ curl -F":operation=import" -F":contentType=json" -F":name=sample" -F':content={ "jcr:primaryType": "nt:unstructured", "propOne" : "propOneValue", "childOne" : { "childPropOne" : true } }' http://host/content</p>
+<p>For example the following command line imports the <code>/content/sample</code> page without the optional name parameter:</p>
+<p>$ curl -F":operation=import" -F":contentType=json" -F':content={ "sample" : {"propOne" : "propOneValue", "childOne" : { "childPropOne" : true } } }' http://host/content</p>
+<p>For example the following form imports the <code>/content/sample</code> page:</p>
+<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" />
+
+<input type="text" name=":content" value="{ "jcr:primaryType" : "nt:unstructured" , "propOne" : "propOneValue", "childOne" : { "childPropOne" : true } }" />
+<input type="Submit" />
+</form>
+<p>For example the following form imports content from a file upload:</p>
+<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" />
+
+<input type="file" name=":contentFile" />
+<input type="Submit" />
+</form>
+<h6>Response Status</h6>
+<p>The move operation applied to multiple resources has the following status responses:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Explanation </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>200/OK </td>
+ <td>All requested content has been imported </td>
+ </tr>
+ <tr>
+ <td>404/NOT FOUND </td>
+ <td>The target parent node does not exist </td>
+ </tr>
+ <tr>
+ <td>412/PRECONDITION FAILED </td>
+ <td>One or more of the required parameters does not exist </td>
+ </tr>
+ <tr>
+ <td>500/INTERNAL SERVER ERROR </td>
+ <td>Some exception, for example a <code>RepositoryException</code>, occurred while processing the request. This status is also set if the ContentImporter service is missing. </td>
+ </tr>
+ </tbody>
+</table>
+<h3>Null Operation</h3>
+<p>Sometimes it is useful to explicitly request that nothing is to be done. The SlingPostServlet now provides such an operation under the name <code>nop</code>. Apart from doing nothing, the <code>nop</code> operations sets the response status to either the default <code>200/OK</code> or to any status requested by the <code>:nopstatus</code> request parameter.</p>
+<p>The <code>:nopstatus</code> request parameter must be an integral number in the range [ 100 .. 999 ]. If the parameter value cannot be parsed to an integer or the value is outside of this range, the default status <code>200/OK</code> is still set.</p>
+<h6>Response Status</h6>
+<p>The null operation sets a default status or the status requested by the <code>:nopstatus</code> request parameter.</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Explanation </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>200/OK </td>
+ <td>Default status set if <code>:nopstatus</code> parameter is not set or does not have a valid value </td>
+ </tr>
+ <tr>
+ <td>{:nopstatus} </td>
+ <td>The status as requested by the <code>:nopstatus</code> parameter </td>
+ </tr>
+ </tbody>
+</table>
+<h2>Special Parameters</h2>
+<p>Some parameters have special significance for the complete processing of the SlingPostServlet or are used by multiple operations. This section summarizes these parameters:</p>
+<h3><code>:order</code></h3>
+<p>Child nodes may be ordered if the primary node type of their common parent node is defined as having orderable child nodes. To employ such ordering, the content creation/modification, move and copy operations support the <code>:order</code> parameter which apply child node ordering amongst its siblings of the target node.</p>
+<p>The <code>:order</code> parameter may have the following values:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Value </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>first</code> </td>
+ <td>Place the target node as the first amongst its siblings </td>
+ </tr>
+ <tr>
+ <td><code>last</code> </td>
+ <td>Place the target node as the last amongst its siblings </td>
+ </tr>
+ <tr>
+ <td><code>before *xyz*</code> </td>
+ <td>Place the target node immediately before the sibling whose name is <em>xyz</em> </td>
+ </tr>
+ <tr>
+ <td><code>after *xyz*</code> </td>
+ <td>Place the target node immediately after the sibling whose name is <em>xyz</em> </td>
+ </tr>
+ <tr>
+ <td>numeric </td>
+ <td>Place the target node at the indicated numeric place amongst its siblings where <em>0</em> is equivalent to <code>first</code> and <em>1</em> means the second place </td>
+ </tr>
+ </tbody>
+</table>
+<p>Note that simple content reordering can be requested without applying any other operations. This is easiest done by placing a request to the resource to be reordered and just setting the <code>:order</code> parameter. For example to order the <code>/content/sample/page5</code> resource above its sibling resource <code>/content/sample/other</code> a simple request</p>
+<p>$ curl -F":order=before other" http://host/content/sample/page5</p>
+<p>does the trick. To be redirected after the reodering, the <code>:redirect</code> parameter may optionally also be specified.</p>
+<h3><code>:redirect</code></h3>
+<p>Instructs the SlingPostServlet to redirect the client to the indicated location if the operation succeeds. That is the response status is set to <em>302/FOUND</em> and the <code>Location</code> header is set to the value of the <code>:redirect</code> parameter.</p>
+<h3><code>:status</code></h3>
+<p>By default the SlingPostServlet sets response status according to the status of the operation executed. In some cases, it may be desirable to not have the real status codes (e.g. 404 or 505) but a normal <em>200/OK</em> to trick the client browser into displaying the response content generated by the SlingPostServlet.</p>
+<p>To not send the actual response status back to the client, the <code>:status</code> request parameter should be set to <code>browser</code>. If this parameter is not set, is empty, is set to <code>standard</code> or to any other value, the actual status code is sent back to the client.</p>
+<h2>Response format</h2>
+<p>The SlingPostServlet produces a basic HTTP response body, listing the response status, what changes have been made, and other meta-data about the result of the POST request.</p>
+<p>The format of this response is either HTML or JSON (JSON support introduced with <a href="https://issues.apache.org/jira/browse/SLING-1336">SLING-1336</a>). SlingPostServlet determines which format to use by examining the Accept header of the incoming request. If the client has specified a preference for the media type "application/json", the JSON format is used, otherwise HTML is returned. The Accept header can be overridden (and simulated) by posting a :http-equiv-accept field, which should have the same format as the Accept header.</p>
+<p>Examples:</p>
+<ol>
+ <li>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,**/**;q=0.8</li>
+ <li>Accept: application/json,**/**;q=0.9</li>
+</ol>
+<p>In example #1, SlingPostServlet will return HTML, since the client has specified a preference for text/html. In example #2, SlingPostServlet will return JSON.</p>
+<p>See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">RFC 2616, section 14.1</a> for information on the HTTP Accept header.</p>
+<h2>Versionable Node Support</h2>
+<p>The modify (default), delete, move, and copy operations of the SlingPostServlet support JCR Versionable Nodes. By default, when a node needs to be checked out for a modification to occur, it will be checked out and any nodes the operation checks out will be checked in upon completion of the request. Newly created versionable nodes (or non-versionable nodes made versionable by adding the mix:versionable mixin) will be left in their default, checked out state.</p>
+<p>This default behavior can be modified either globally (i.e. for all requests) or on a per-request basis. The global behavior is changed through OSGi ConfigAdmin using these three properties of the PID <code>org.apache.sling.servlets.post.impl.SlingPostServlet</code>:</p>
+<ul>
+ <li><code>servlet.post.checkinNewVersionableNodes</code></li>
+ <li><code>servlet.post.autoCheckout</code></li>
+ <li><code>servlet.post.autoCheckin</code></li>
+</ul>
+<p><img src="2010-07-01_1036.png" /></p>
+<p>On a per-request basis, these request parameters can be used:</p>
+<ul>
+ <li><code>:checkinNewVersionableNodes</code></li>
+ <li><code>:autoCheckout</code></li>
+ <li><code>:autoCheckin</code></li>
+</ul>
+<p>Checkout and Check In changes will be reflected in the ChangeLog portion of the response.</p>
+<h2>Extending the SlingPostServlet</h2>
+<h3>Additional POST operations</h3>
+<p>OSGi services of the <code>org.apache.sling.servlets.post.PostOperation</code> type can be used to implement new POST operations.</p>
+<p>Such services must have a <code>sling.post.operation</code> service registration property set to the name of the operation. This name is used as the value of the <code>:operation</code> parameter of POST requests to select the extended operation.</p>
+<p>Before version 2.1.2 of the <em>org.apache.sling.servlets.post</em> bundle, such additional operations were implemented by the <code>org.apache.sling.servlets.post.SlingPostOperation</code> interface, which is now deprecated but still supported via a bridge. See <a href="https://issues.apache.org/jira/browse/SLING-1725">SLING-1725</a> for details and discussions about this change.</p>
+<p>Two examples (old and new style) of additional POST operations are found in the <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/post/">test-services</a> module, with the corresponding test code in the <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/CustomPostOperationTest.java">integration-tests</a> module.</p>
+<h3>SlingPostProcessor</h3>
+<p>OSGi services of the <code>org.apache.sling.servlets.post.SlingPostOperation</code> type can be used to post process <code>PostOperation</code>s. They are called after the operation has performed its changes but before the changes are persisted (via commit). All registered SlingPostProcessors are always called in the reverse order of their service ranking (i.e. the one with the highest service ranking first).</p>
+<p>A <code>SlingPostProcessor</code> may perform additional changes or revert previous ones. It is important that the <code>SlingPostProcessor</code> does not commit its changes but rather only performs the changes in the transient space (with the resource resolver bound to the current request) and in addition reports the changes through the 2nd parameter of the method <code>process(SlingHttpServletRequest, List<Modification>)</code>.</p>
+<p>Two examples of SlingPostProcessors are found in the <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/post/">test-services</a> module, with the corresponding test code in the <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/SlingPostProcessorTest">integration-tests</a> module.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/metrics.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/metrics.html b/documentation/bundles/metrics.html
new file mode 100644
index 0000000..2b24803
--- /dev/null
+++ b/documentation/bundles/metrics.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Sling Metrics</h1></header><p>Sling Metrics bundle provides integration with <a href="http://metrics.dropwizard.io/">Dropwizard Metrics</a> library which provides a toolkit to capture runtime performance statistics in your application.</p>
+<h2>Features</h2>
+<ul>
+ <li>Registers a <a href="https://github.com/apache/sling/blob/trunk/bundles/commons/metrics/src/main/java/org/apache/sling/commons/metrics/MetricsService.java">MetricsService</a> which can be used to create various types of Metric instances</li>
+ <li>WebConsole Plugin which provides a HTML Reporter for the various Metric instances</li>
+ <li>Inventory Plugin which dumps the Metric state in plain text format</li>
+</ul>
+<h2>Basic Usage</h2>
+<p>:::java import org.apache.sling.metrics.Counter; import org.apache.sling.metrics.MetricsService;</p>
+<p>@Reference private MetricsService metricsService;</p>
+<p>private Counter counter;</p>
+<p>@Activate private void activate(){ counter = metricsService.counter("sessionCounter"); }</p>
+<p>public void onSessionCreation(){ counter.increment(); }</p>
+<p>To make use of <code>MetricsService</code></p>
+<ol>
+ <li>Get a reference to <code>org.apache.sling.metrics.MetricsService</code></li>
+ <li>Initialize the metric e.g. Counter in above case. This avoids any potential lookup cost in critical code paths</li>
+ <li>Make use of metric instance to capture require stats</li>
+</ol>
+<p>Refer to <a href="https://dropwizard.github.io/metrics/3.1.0/getting-started/#counters">Metric Getting Started</a> guide to see how various types of Metric instances can be used. Note that when using Sling Commons Metrics bundle class names belong to <code>org.apache.sling.commons.metrics</code> package</p>
+<h2>Best Practices</h2>
+<ol>
+ <li>Use descriptive names - Qualify the name with class/package name where the metric is being used</li>
+ <li>Do not use the metrics for operation which take less than 1E-7s i.e. 1000 nano seconds otherwise timer overhead (Metrics makes use of System.nanoTime) would start affecting the performance.</li>
+</ol>
+<h2>API</h2>
+<p>Sling Metrics bundle provides its own Metric classes which are modelled on <a href="http://metrics.dropwizard.io/">Dropwizard Metrics</a> library. The metric interfaces defined by Sling bundle only provides methods related to data collection.</p>
+<ul>
+ <li><a href="https://github.com/apache/sling/blob/trunk/bundles/commons/metrics/src/main/java/org/apache/sling/commons/metrics/Meter.java">org.apache.sling.commons.metrics.Meter</a> - Similar to <a href="https://dropwizard.github.io/metrics/3.1.0/manual/core/#meters">Dropwizard Meter</a></li>
+ <li><a href="https://github.com/apache/sling/blob/trunk/bundles/commons/metrics/src/main/java/org/apache/sling/commons/metrics/Timer.java">org.apache.sling.commons.metrics.Timer</a> - Similar to <a href="https://dropwizard.github.io/metrics/3.1.0/manual/core/#timers">Dropwizard Timer</a></li>
+ <li><a href="https://github.com/apache/sling/blob/trunk/bundles/commons/metrics/src/main/java/org/apache/sling/commons/metrics/Counter.java">org.apache.sling.commons.metrics.Counter</a> - Similar to <a href="https://dropwizard.github.io/metrics/3.1.0/manual/core/#counters">Dropwizard Counter</a></li>
+ <li><a href="https://github.com/apache/sling/blob/trunk/bundles/commons/metrics/src/main/java/org/apache/sling/commons/metrics/Histogram.java">org.apache.sling.commons.metrics.Histogram</a> - Similar to <a href="https://dropwizard.github.io/metrics/3.1.0/manual/core/#histograms">Dropwizard Histogram</a></li>
+</ul>
+<p>Further it provides a <code>MetricsService</code> which enables creation of different type of Metrics like Meter, Timer, Counter and Histogram.</p>
+<h3>Requirement of wrapper interfaces</h3>
+<ul>
+ <li>Abstraction - Provides an abstraction around how metrics are collected and how they are reported and consumed. Most of the code would only be concerned with collecting interesting data. How it gets consumed or reported is implementation detail.</li>
+ <li>Ability to turnoff stats collection - We can easily turn off data collection by switching to NOOP variant of <code>MetricsService</code> in case it starts adding appreciable overhead. Turning on and off can also be done on individual metric basis.</li>
+</ul>
+<p>It also allows us to later extend the type of data collected. For e.g. we can also collect <a href="https://jackrabbit.apache.org/api/2.6/org/apache/jackrabbit/api/stats/TimeSeries.html">TimerSeries</a> type of data for each metric without modifying the caller logic.</p>
+<h3>Access to Dropwizard Metrics API</h3>
+<p>Sling Metrics bundle also registers the <code>MetricRegistry</code> instance with OSGi service registry. The instance registered has a service property <code>name</code> set to <code>sling</code> (so as allow distinguishing from any other registered <code>MetricRegistry</code> instance). It can be used to get direct access to Dropwizard Metric API if required.</p>
+<p>:::java @Reference(target = "(name=sling)") private MetricRegistry registry;</p>
+<p>Also the wrapper Metric instance can be converted to actual instance via <code>adaptTo</code> calls.</p>
+<p>:::java import org.apache.sling.commons.metrics.Counter</p>
+<p>Counter counter = metricService.counter("login"); com.codahale.metrics.Counter = counter.adaptTo(com.codahale.metrics.Counter.class)</p>
+<h2>WebConsole Plugin</h2>
+<p>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.</p>
+<p><img src="/documentation/bundles/metric-web-console.png" alt="Metric Plugin" /></p>
+<p>The plugin lists all Metric instances from any <code>MetricRegistry</code> instance found in the OSGi service registry. If the <code>MetricRegistry</code> service has a <code>name</code> property defined then that would be prefixed to the Metric names from that registry. This allows use of same name in different registry instances.</p>
+<h2>Installation</h2>
+<p>Add following Maven dependency to your pom.xml:</p>
+<p>:::xml <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.commons.metrics</artifactId> <version>1.0.0</version> </dependency></p>
+<p>Or download from <a href="http://sling.apache.org/downloads.cgi">here</a></p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
[24/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/context-aware-configuration/context-aware-configuration.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/context-aware-configuration/context-aware-configuration.md b/content/documentation/bundles/context-aware-configuration/context-aware-configuration.md
deleted file mode 100644
index a092cfa..0000000
--- a/content/documentation/bundles/context-aware-configuration/context-aware-configuration.md
+++ /dev/null
@@ -1,255 +0,0 @@
-title=Apache Sling Context-Aware Configuration
-type=page
-status=published
-~~~~~~
-
-[TOC]
-
-# About
-
-These bundles provide a service API that can be used to get context-aware configurations. Context-aware configurations are configurations that are related to a content resource or a resource tree, e.g. a web site or a tenant site.
-
-Here is an example how your content structure may look like:
-
-![Configuration example](context-aware-config-example.png)
-
-The application needs different configuration for different sites, regions and tenants = different contexts. Some parameters may be shared, so inheritance for nested contexts and from global fallback values is supported as well. You have full control which content subtrees are the contexts in your application, the structure above is only an example.
-
-Using the Context-Aware Configuration Java API you can get the matching configuration for each content resource without caring where it is stored or how the inheritance works.
-
-
-# Java API
-
-To get and use configurations, the Java API must be used. Any using code must not make any assumptions on how the context-aware configurations are searched or stored!
-
-The Java API consists of two parts:
-
-- Context-Aware Resources: 'Low-level' API for accessing configuration resources (which can be anything, e.g. workflow definitions)
-- Context-Aware Configurations: 'High-level' API for accessing configuration data (key/value pairs)
-
-In most cases you will use only the 'High-level' API for getting context-aware configurations.
-
-
-## Context-Aware Resources
-
-The base concept are context-aware resources: for a given content resource, a named configuration resource can be get.
-The service for getting the configuration resources is called the ConfigurationResourceResolver. This service has two methods:
-
-- getting a named configuration resource
-- getting all child resources of a named configuration resource.
-
-For example to get a configuration resource for a content resource at /content/mysite/page1, you would get a reference to the OSGi service
-`org.apache.sling.caconfig.resource.ConfigurationResourceResolver` and write:
-
-#!java
-Resource contentResource = resourceResolver.getResource("/content/mysite/page1");
-
-Resource configResource = configurationResourceResolver.getResource(contentResource, "my-bucket", "my-config");
-
-Or if you have several configuration resources of the same type and you need all of them:
-
-#!java
-Collection<Resource> configResources = configurationResourceResolver.getResourceCollection(contentResource, "my-bucket", "my-config");
-
-The ConfigurationResourceResolver has a concept of "buckets" (2nd parameter in the method signatures) that allows to separate different types of configuration resources into different resource hierarchies, so you have a separate "namespaces" for the named configuration resources. For example one bucket for workflow definitions, one bucket for template definitions, one for key/value-pairs.
-
-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
-
-While context-aware resources give you pure resources and your application code can decide what to do with it,
-the most common use case is some configuration. A configuration is usually described by an annotation class
-(like Declarative Services does for component configurations). These are typed configuration objects
-and the context-aware configuration support automatically converts resources into the wanted configuration type.
-
-Context-aware configurations are built on top of context-aware resources. The same concept is used: configurations are
-named and the service to get them is the ConfigurationResolver. You can get a reference to the OSGi service
-`org.apache.sling.caconfig.ConfigurationResolver` - it has a single method to get a ConfigurationBuilder.
-Alternatively you can directly adapt your content resource directly to the ConfigurationBuilder interface and get the configuration:
-
-#!java
-Resource contentResource = resourceResolver.getResource("/content/mysite/page1");
-
-MyConfig config = contentResource.adaptTo(ConfigurationBuilder.class).as(MyConfig.class);
-
-Or if you want to get a list of configurations:
-
-#!java
-Collection<MyConfig> configs = contentResource.adaptTo(ConfigurationBuilder.class).asCollection(MyConfig.class);
-
-The ConfigurationBuilder also supports getting the configurations as ValueMap or by adapting the configuration resources e.g. to a Sling Model. In this case you have to specify a configuration name which is otherwise derived automatically from the annotation class.
-
-Internally the ConfigurationResolver used the ConfigurationResourceResolver to get the configuration resources. It uses always the bucket name `sling:configs`.
-
-
-# Contexts and configuration references
-
-When you use the [Default Implementation][default-impl] contexts in the content resource hierarchy is defined by setting `sling:configRef` properties. Each resource that has a `sling:configRef` property set defines the root resource of a context, the whole subtree is the context. Within the subtree further nested contexts can be defined. The property contains a resource path pointing to a resource below `/conf`. This is the configuration reference.
-
-Example:
-
-![Context and config reference](context-and-config-reference.png)
-
-If you define nested contexts or use a deeper hierarchy of resourced in `/conf` the inheritance rules are applied. Additionally it is possible to define default values as fallback if no configuration resource exists yet in `/conf`. See [Default Implementation][default-impl] for details.
-
-
-# Describe configurations via annotation classes
-
-You need an annotation class for each configuration you want to read via the ConfigurationBuilder. The annotation classes may be provided by
-the applications/libraries you use, or you can define your own annotation classes for your application.
-
-The annotation class may look like this:
-
-#!java
-@Configuration(label="My Configuration", description="Describe me")
-public @interface MyConfig {
-
-@Property(label="Parameter #1", description="Describe me")
-String param1();
-
-@Property(label="Parameter with Default value", description="Describe me")
-String paramWithDefault() default "defValue";
-
-@Property(label="Integer parameter", description="Describe me")
-int intParam();
-
-}
-
-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.
-
-By default the annotation class name is used as configuration name, which is also the recommended option. If you want to use an arbitrary configuration name you can specify it via a `name` property on the `@Configuration` annotation.
-
-You may specify custom properties (via `property` string array) for the configuration class or each properties. They are not used by the Sling Context-Aware configuration implementation, but may be used by additional tooling to manage the configurations.
-
-If you provide your own configuration annotation classes in your bundle, you have to export them and list all class names in a bundle header named `Sling-ContextAware-Configuration-Classes` - example:
-
-Sling-ContextAware-Configuration-Classes: x.y.z.MyConfig, x.y.z.MyConfig2
-
-To automate this you can use the Context-Aware Configuration bnd plugin (see next chapter).
-
-
-# Accessing configuration from HTL/Sightly templates
-
-Context-Aware configuration contains a Scripting Binding Values provider with automatically registeres a `caconfig` variable in your HTL/Sightly scripts to directly access context-aware configurations. It supports both singleton configurations and configuration lists. Please note that configuration lists are only supported when configuration metadata is present (e.g. via an annotation class).
-
-Example for accessing a property of a singleton configuration (with a config name `x.y.z.ConfigSample`):
-
-#!html
-<dl>
-<dt>stringParam:</dt>
-<dd>${caconfig['x.y.z.ConfigSample'].stringParam}</dd>
-</dl>
-
-Example for accessing a property of a configuration list (with a config name `x.y.z.ConfigSampleList`):
-
-#!html
-<ul data-sly-list.item="${caconfig['x.y.z.ConfigSampleList']}">
-<li>stringParam: ${item.stringParam}</li>
-</ul>
-
-If you want to access nested configurations you have to use a slash "/" as separator in the property name. Example:
-
-#!html
-${caconfig['x.y.z.ConfigSample']['nestedConfig/stringParam']}
-
-
-# Context-Aware Configuration bnd plugin
-
-A [bnd](http://bnd.bndtools.org/) plugin is provided that scans the classpath of a bundle Maven project at build time and automatically generates a `Sling-ContextAware-Configuration-Classes` bundle header for all annotation classes annotated with `@Configuration`. It can be used by both [maven-bundle-plugin](http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html) and [bnd-maven-plugin](https://github.com/bndtools/bnd/tree/master/maven), as both use the bnd library internally.
-
-Example configuration:
-
-#!xml
-<plugin>
-<groupId>org.apache.felix</groupId>
-<artifactId>maven-bundle-plugin</artifactId>
-<extensions>true</extensions>
-<configuration>
-<instructions>
-<!-- Generate bundle header containing all configuration annotation classes -->
-<_plugin>org.apache.sling.caconfig.bndplugin.ConfigurationClassScannerPlugin</_plugin>
-</instructions>
-</configuration>
-<dependencies>
-<dependency>
-<groupId>org.apache.sling</groupId>
-<artifactId>org.apache.sling.caconfig.bnd-plugin</artifactId>
-<version>1.0.2</version>
-</dependency>
-</dependencies>
-</plugin>
-
-
-# Unit Tests with Context-Aware Configuration
-
-When your code depends on Sling Context-Aware Configuration and you want to write Sling Mocks-based unit tests running against the Context-Aware configuration implementation you have to register the proper OSGi services to use them. To make this easier, a "Apache Sling Context-Aware Configuration Mock Plugin" is provided which does this job for you.
-
-Example for setting up the unit test context rule:
-
-#!java
-import static org.apache.sling.testing.mock.caconfig.ContextPlugins.CACONFIG;
-
-public class MyTest {
-
-@Rule
-public SlingContext context = new SlingContextBuilder().plugin(CACONFIG).build();
-
-@Before
-public void setUp() {
-// register configuration annotation class
-MockContextAwareConfig.registerAnnotationClasses(context, SimpleConfig.class);
-}
-...
-
-In you project define a test dependency (additionally the sling-mock dependency is required):
-
-#!xml
-<dependency>
-<groupId>org.apache.sling</groupId>
-<artifactId>org.apache.sling.testing.caconfig-mock-plugin</artifactId>
-<scope>test</scope>
-</dependency>
-
-Full example: [Apache Sling Context-Aware Configuration Mock Plugin Test](https://github.com/apache/sling/blob/trunk/testing/mocks/caconfig-mock-plugin/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java)
-
-
-# Customizing the configuration lookup
-
-The Context-Aware Configuration implementation provides a set of Service Provider Interfaces (SPI) that allows you to overlay, enhance or replace the default implementation and adapt it to your needs.
-
-See [SPI][spi] for details.
-
-You can also override specific context-aware configuration within an instance - see [Override][override] for details.
-
-
-# Web Console plugins
-
-The Context-Aware Configuration implementation provides two extension to the Felix Web Console:
-
-- A plugin "Sling / Context-Aware Configuration" that allows to test configuration resolution and prints outs all metadata. This is helpful debugging the resolution and collection and property inheritance. For each resource and property value the the real source resource path is listed.
-- A inventory printer "Sling Context-Aware Configuration" which lists all SPI implementations that are deployed, and additionally prints out all configuration metadata and override strings
-
-To use the web console plugin you need to configure a "Service User" mapping for the bundle `org.apache.sling.caconfig.impl` to a system user which has read access to all context and configuration resources. By default this should be `/content`, `/conf`, `/apps/conf` and `/libs/conf`.
-
-
-# Management API
-
-The Context-Aware Configuration Implementation Bundle provides a Management API which allows to read and write configuration data. It supports only Context-Aware configurations, not context-aware resources. It should not be used directly in applications, but is intended to provide an API for editor GUIs and other tools which allow to manage configurations.
-
-The main entry point is the OSGi service `org.apache.sling.caconfig.management.ConfigurationManager`. It allows to get, write or delete singleton configurations and configuration lists. Configuration data is returned using `ConfigurationData` and `ConfigurationCollectionData` objects which also provide access to additional metadata about the resolving process and inheritance/override status of each property. Internally the configuration manager uses the [SPI][spi] implementation to resolve and write the configuration data.
-
-Whenever configuration data is read or written from the configuration resources a filtering of property names is applied to make sure "system properties" like `jcr:primaryType` or `jcr:created` are not returned as part of the configuration data. A list of regular expressions for this filtering can be configured via the "Apache Sling Context-Aware Configuration Management Settings" OSGi configuration. The configuration is accessible to custom persistence implementations via the `org.apache.sling.caconfig.management.ConfigurationManagementSettings` OSGi service. By default all properties in the `jcr:` namespace are filtered out.
-
-
-# References
-
-* [Context-Aware Configuration - Default Implementation][default-impl]
-* [Context-Aware Configuration - SPI][spi]
-* [Context-Aware Configuration - Override][override]
-* [Sling Context-Aware Configuration - Talk from adaptTo() 2016](https://adapt.to/2016/en/schedule/sling-context-aware-configuration.html)
-
-
-[default-impl]: http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html
-[spi]: http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html
-[override]: http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-override.html
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/context-aware-configuration/illustration-sources.pptx
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/context-aware-configuration/illustration-sources.pptx b/content/documentation/bundles/context-aware-configuration/illustration-sources.pptx
deleted file mode 100644
index 324604e..0000000
Binary files a/content/documentation/bundles/context-aware-configuration/illustration-sources.pptx and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/context-aware-configuration/resource-inheritance.png
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/context-aware-configuration/resource-inheritance.png b/content/documentation/bundles/context-aware-configuration/resource-inheritance.png
deleted file mode 100644
index 89cc9f4..0000000
Binary files a/content/documentation/bundles/context-aware-configuration/resource-inheritance.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/datasource-providers.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/datasource-providers.md b/content/documentation/bundles/datasource-providers.md
deleted file mode 100644
index 64942c8..0000000
--- a/content/documentation/bundles/datasource-providers.md
+++ /dev/null
@@ -1,123 +0,0 @@
-title=DataSource Provider
-type=page
-status=published
-~~~~~~
-
-DataSource provider bundle supports creation of `DataSource` instance and registering them with
-the OSGi service registry. Application using the DataSource just obtains it from OSGi while
-an administrator can configure the DataSource via Felix WebConsole configuration UI.
-
-[TOC]
-
-## Pooled Connection DataSource Provider
-
-This bundle enables creating and configuring JDBC DataSource in OSGi environment based on
-OSGi configuration. It uses [Tomcat JDBC Pool][1] as the JDBC Connection Pool provider.
-
-1. Supports configuring the DataSource based on OSGi config with rich metatype
-2. Supports deploying of JDBC Driver as independent bundles and not as fragment
-3. Exposes the DataSource stats as JMX MBean
-4. Supports updating of DataSource connection pool properties at runtime without restart
-
-### Driver Loading
-
-Loading of JDBC driver is tricky on OSGi env. Mostly one has to attach the Driver bundle as a
-fragment bundle to the code which creates the JDBC Connection.
-
-With JDBC 4 onwards the Driver class can be loaded via Java SE Service Provider mechanism (SPM)
-JDBC 4.0 drivers must include the file META-INF/services/java.sql.Driver. This file contains
-the name of the JDBC driver's implementation of java.sql.Driver. For example, to load the JDBC
-driver to connect to a Apache Derby database, the META-INF/services/java.sql.Driver file would
-contain the following entry:
-
-org.apache.derby.jdbc.EmbeddedDriver
-
-Sling DataSource Provider bundles maintains a `DriverRegistry` which contains mapping of Driver
-bundle to Driver class supported by it. With this feature there is no need to wrap the Driver
-bundle as fragment to DataSource provider bundle
-
-
-### Configuration
-
-1. Install the current bundle
-2. Install the JDBC Driver bundle
-3. Configure the DataSource from OSGi config for PID `org.apache.sling.datasource.DataSourceFactory`
-
-If Felix WebConsole is used then you can configure it via Configuration UI at
-http://localhost:8080/system/console/configMgr/org.apache.sling.datasource.DataSourceFactory
-
-![Web Console Config](/documentation/development/sling-datasource-config.png)
-
-Using the config ui above one can directly configure most of the properties as explained in [Tomcat Docs][1]
-
-### Convert Driver jars to Bundle
-
-Most of the JDBC driver jars have the required OSGi headers and can be directly deployed to OSGi container
-as bundles. However some of the drivers e.g. Postgres are not having such headers and hence need to be
-converted to OSGi bundles. For them we can use the [Bnd Wrap][2] command.
-
-For example to convert the Postgres driver jar follow the steps below
-
-$ wget https://github.com/bndtools/bnd/releases/download/2.3.0.REL/biz.aQute.bnd-2.3.0.jar -O bnd.jar
-$ wget http://jdbc.postgresql.org/download/postgresql-9.3-1101.jdbc41.jar
-$ cat > bnd.bnd <<EOT
-Bundle-Version: 9.3.1101
-Bundle-SymbolicName: org.postgresql
-Export-Package: org.postgresql
-Include-Resource: @postgresql-9.3-1101.jdbc41.jar
-EOT
-$ java -jar bnd.jar bnd.bnd
-
-In the steps above we
-
-1. Download the bnd jar and postgres driver jar
-2. Create a bnd file with required instructions.
-3. Execute the bnd command
-4. Resulting bundle is present in `org.postgresql-9.3.1101.jar`
-
-## JNDI DataSource
-
-While running in Application Server the DataSource instance might be managed by app server and registered with
-JNDI. To enable lookup of DataSource instance from JNDI you can configure `JNDIDataSourceFactory`
-
-1. Configure the DataSource from OSGi config for PID `org.apache.sling.datasource.JNDIDataSourceFactory`
-2. Provide the JNDI name to lookup from and other details
-
-If Felix WebConsole is used then you can configure it via Configuration UI at
-http://localhost:8080/system/console/configMgr/org.apache.sling.datasource.JNDIDataSourceFactory
-
-Once configured `JNDIDataSourceFactory` would lookup the DataSource instance and register it with OSGi
-ServiceRegistry
-
-## Usage
-
-Once the required configuration is done the `DataSource` would be registered as part of the OSGi Service Registry
-The service is registered with service property `datasource.name` whose value is the name of datasource provided in
-OSGi config.
-
-Following snippet demonstrates accessing the DataSource named `foo` via DS annotation
-
-::java
-import javax.sql.DataSource;
-import org.apache.felix.scr.annotations.Reference;
-
-public class DSExample {
-
-@Reference(target = "(&(objectclass=javax.sql.DataSource)(datasource.name=foo))")
-private DataSource dataSource;
-}
-
-## Installation
-
-Download the bundle from [here][3] or use following Maven dependency
-
-::xml
-<dependency>
-<groupId>org.apache.sling</groupId>
-<artifactId>org.apache.sling.datasource</artifactId>
-<version>1.0.0</version>
-</dependency>
-
-[1]: http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
-[2]: http://bnd.bndtools.org/chapters/390-wrapping.html
-[3]: http://sling.apache.org/downloads.cgi
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/discovery-api-and-impl.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/discovery-api-and-impl.md b/content/documentation/bundles/discovery-api-and-impl.md
deleted file mode 100644
index 10abaf9..0000000
--- a/content/documentation/bundles/discovery-api-and-impl.md
+++ /dev/null
@@ -1,413 +0,0 @@
-title=Discovery API and its implementations
-type=page
-status=published
-~~~~~~
-
-In many situations a particular Sling-based deployment consists of several Sling instances:
-typically a number of instances would form a `cluster` that share a common content repository -
-in other situations, or additionally, instances might be loosely coupled, each with their own repository.
-
-The `discovery-api` bundle introduces an abstraction for such scenarios called `topology`. It provides
-access to the current topology, allows to be informed of any changes in the topology (such as joining or leaving
-instances) and contains a simple property exchange mechanism, e.g. to allow building communication services on top of it.
-
-[TOC]
-
-## Discovery Entities
-
-The Discovery API defines the following entities
-
-### Instance, InstanceDescription
-
-A Sling instance running in one VM is represented in the discovery API by an `InstanceDescription`:
-
-* it represents one Sling instance
-* it has thus a unique Sling ID
-* it has a flag that marks if it is leader in a cluster (more details below)
-* plus it has properties (which can be provided via `PropertyProviders`)
-
-### Cluster, ClusterView
-
-Multiple instances that are connected to the same underlying repository are commonly referred to as a 'Cluster'. The reasoning behind this terminology being that they access the same data and can thus deliver or modify the same data.
-
-In the discovery API this cluster concept is represented via a `ClusterView` object. A 'view' because it is a momentary snapshot of the cluster and only contains instances that are currently alive. It's features are:
-
-* each cluster has a stable leader. Stable meaning it won't change unless that leader crashes.
-* it has an ordered, stable list of instances that are part of it, thus currently alive. the relative order of instances in this list is stable, meaning that it only stays or moves up one position if an instance listed 'above' crashes - a newly started instance will always be added at the end of this list.
-* plus it has a unique id that is persistent across restarts
-
-### Topology, TopologyView
-
-The topology - or more precisely the `TopologyView` - represents a snapshot (`view`) of a number of loosely coupled Sling instances (`InstanceDescription`)
-and clusters (`ClusterView`) of a particular deployment. A cluster can consist of one or more instances. Each instance
-is always part of a cluster (even if the cluster consists of only one instance). The features are:
-
-* only one: it has a list of clusters
-
-There are no further assumption made on the structure of a topology.
-
-If different clusters in the topology should represent different 'types of clusters' (eg a publish or an author cluster),
-then that is not explicitly handled by the discovery API. Instead, applications can define properties on each instance
-that model such cluster types or other aspects.
-
-## Cluster Leader and Instance Ordering
-
-As mentioned the discovery API introduces support for a `cluster leader`: within each cluster, the API guarantees that one and only one
-instance is leader at any time. That leader is guaranteed to be `stable`, ie as long as it stays alive and is visible
-by other instances of the same cluster, it will stay leader. As soon as it leaves the cluster (or the corresponding
-implementation bundle is deactivated), another instance in that cluster is elected leader. The leader can be used to
-deal with work that must be guaranteed to only execute on one (but any) instance in the cluster.
-
-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
-
-The `DiscoveryService` provides access to the currently valid `TopologyView`. Additionally, applications can
-register a `TopologyEventListener` and thus be informed about any changes in the topology. Whenever the discovery
-service detects that an instance is no longer responding or has newly joined, or a new leader has been elected,
-it sends a `TOPOLOGY_CHANGING` event, starts
-settling the change within the topology (i.e. making sure everybody else in the topology agrees with the change) and finally
-sends a `TOPOLOGY_CHANGED` event with the new topology.
-
-Additionally, when "only" properties have changed, a `PROPERTIES_CHANGED` event is sent.
-
-Note that the detection of topology (or properties) changes will incur a delay which is implementation dependent.
-
-The following is an example of a listener. Note that the binding is done automatically by OSGi, as soon as a
-`TopologyEventListener` is registered.
-
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
-import org.apache.sling.discovery.TopologyEvent;
-import org.apache.sling.discovery.TopologyEventListener;
-
-@Component
-@Service(value = { TopologyEventListener.class })
-public class MyTopologyEventListener implements TopologyEventListener {
-
-public void handleTopologyEvent(final TopologyEvent event) {
-// your code here
-}
-
-}
-
-
-## Properties
-
-The discovery API not only lists all clusters and instances that are part of a topology but also provides a simple
-mechanism for announcing properties of each instance to the topology, via the `PropertyProvider` service interface.
-
-Typical use cases for this are announcements of endpoint URLs or ports such that applications can communicate to other
-instances in the topology.
-
-Note that the properties mechanism is not meant be used as a messaging tool: both from an API point of view and
-the implementation of it are not optimized for frequent changes and its use for messaging is discouraged. It is only
-meant to be used to announce configuration information for accessing proper messaging services.
-
-The following is an example of a `PropertyProvider` that provides `sample.value1` and `sample.value2` properties:
-
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
-import org.apache.sling.discovery.PropertyProvider;
-
-@Component
-@Service(value = { PropertyProvider.class })
-@Property(name = PropertyProvider.PROPERTY_PROPERTIES,
-value = {"sample.value1", "sample.value2" })
-public class SamplePropertyProvider implements PropertyProvider {
-
-public String getProperty(final String name) {
-if ("sample.value1".equals(name)) {
-return "foo";
-} else if ("sample.value2".equals(name)) {
-return "bar";
-} else {
-return null;
-}
-}
-}
-
-## Deployment and configuration
-
-The discovery API makes no assumptions as to how the instances and clusters discover each other. This is entirely
-up to the implementations. Some might choose automatic discovery within a LAN using IP multicast, others
-might choose explicit configuration via a central service etc.
-
-## 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.
-
-The discovery within a cluster is done by writing heartbeat information into the (common) repository (there's no other form
-of communication within a cluster). The establishment of a
-clusterview is done by analyzing these heartbeats, initiating a voting within the cluster (such that each instance can agree
-that it sees the same number of instances) and by concluding the voting by promoting it as the new "established" view.
-
-The discovery of instances and clusters outside the local cluster requires explicit configuration of what is termed
-'topology connectors', which are HTTP PUTs (see below).
-
-### Location in Repository
-
-Administrative note: All the information about the topology is stored at the following location in the repository:
-
-/var/discovery/impl
-
-#### /var/discovery/impl/clusterInstances/<slingId>
-
-Each instance has its own node under `clusterInstances/` where it stores:
-
-* `lastHeartbeat`: property, which marks the instance as alive for another `heartbeatTimeout`
-* `leaderElectionId`: an id which is used to determine the leader: the instance with the lowest such leaderElectionId is the leader.
-Therefore this id is crucial to implement stable leader and ordering. The id contains a prefix (to account for a crx2 edge case
-where jobs might want to be executed on slave rather than on master), followed by the bundle activate time (to honour stability)
-and ultimately by the slingId (to have a discriminator should there be multiple instances started at the same time)
-* `runtimeId`: a plain, random UUID that is created fresh upon bundle activation. It is used to detect situations where
-multiple instances have the same slingId and thus write into the same `/var/discovery/impl/clusterInstances/<slingId>` node.
-* `slingHomePath` and `endpoints`: these are used for logging purpose only
-
-Additionally, there are two sub-nodes:
-
-* `announcements`: this contains announcements of topology connector peers (also see below). An announcement is a json-encoded
-representation of the sub-tree that the connector peer is aware of and is thereby announcing to this instance. Announcements
-are sent in both directions of a topology connector. Discovery.impl takes care of filtering out duplicate instances should
-the structure of topology connectors, and thus these announcements overlap (which is legal)
-* `properties`: contains all properties as specified by registered `PropertyProvider`
-
-#### /var/discovery/impl/establishedView
-
-This contains the currently valid, agreed/voted upon cluster view that lists all alive instances:
-
-* the name of the node directly under `establishedView` is a unique id of the current incarnation of the cluster view -
-thus changes whenever an instance joins or leaves or there is a new voting for another reason.
-** `clusterId` : name of the persistent identifier of this cluster. As this is propagated from cluster view to cluster view
-it stays unchanged forever.
-** `leaderElectionId`: the leaderElectionId that was winning, ie that was lowest
-** `leaderId`: the slingId of the instance that is leader of this cluster view
-* `members`: just an intermediate node containing all alive instances as child nodes
-* child node of `members`: each child represents a particular alive node (with the name being the slingId) and contains
-the following properties:
-** `leaderElectionId`: the id that will be used to determine the leader - this value is copied from the corresponding
-`/var/discovery/impl/clusterInstances/<slingId>`
-** `initiator`: this marks the instance that originally created this voting
-** `vote`: represents this instance's vote, which is true for a voting that got promoted to established view
-
-#### /var/discovery/impl/ongoingVotings
-
-This area is used for voting. Each instance can initiate a voting when it realizes that the live instances - denominated
-by those instances that have a not-yet-timed-out heartbeat property - does not match with the `establishedView`.
-
-Once a voting gets a yes vote by all instances it is promoted (moved) under `establishedView` by the initiating instance.
-Each establishedView was once a voting, thus the structure is the same as described above.
-
-#### /var/discovery/impl/previousView
-
-The instance that promotes its winning voting to `establishedView` first moves what was there before under `previousView`.
-This is purely for debugging and not used anywhere, it just represents a persistet history of previous views of length 1.
-
-### Heartbeats, Voting and Intra-Cluster Discovery
-
-`discovery.impl` uses the fact that all instance of a cluster are connected to the same repository as the
-basis for discovering those instances. It does so by using a heartbeat and voting mechanism:
-
-* each instance periodically stores a 'heartbeat' into the repository in a well-known location.
-This is done by setting a corresponding `lastHeartbeat` property to the current timestamp
-* a 'heartbeat' that has not yet timed out is considered a signal that the instance is alive
-* as soon as a 'heartbeat' is timed out, the assumption is that the corresponding instance is dead/shutdown
-
-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.
-
-* as soon as any instance notices a change in the list of active instances, it is free to calculate a new
-such list and start a voting in the cluster - each voting carries a unique votingId
-* since any instance can do this, you can have concurrent creation of new votings
-* each instance has one 'yes' vote - and if there are multiple concurrent votings the lowest one wins
-* when a voting receives a 'yes' from all instances that it enlists it is considered as 'winning'
-and is promoted to be the new, valid view from now on.
-* a promoted view is stored in `/var/discovery/impl/establishedView` and any change therein is
-passed on in a TopologyEvent to all registered listeners.
-
-### pseudo-network partitioning aka split-brain
-
-`discovery.impl` requires the, eventually consistent, underlying repository to propagate changes within reasonable time:
-in less than the configured heartbeat timeout. If heartbeats for some reason are not becoming visible by peers in
-the cluster within that time, `discovery.impl` will consider that peer instance as dead. At which point it will
-first send a TOPOLOGY_CHANGING event to all listeners to make them aware that something is changing in the topology,
-and then start a new voting. Once the voting concludes a TOPOLOGY_CHANGED event will follow.
-
-Given the voting is happening through the repository as well, one could imagine a situation where the repository delays
-can cause a topology to be "pseudo partitioned" into two or more parts, each one agreeing on a set of instances in that
-sub-cluster (one requirement for such a scenario being that the delays must be asymmetric, ie changes from a subset
-of instances propagate slow, while the remaining changes propagate fast - ie. two different sets of delays in the cluster).
-Such a situation would only last as long as the repository delays are large (larger than
-the heartbeat timeouts). Exact cases where the repository experiences large delays depend of course on the
-repository configuration and deployment details, known cases include for example long running queries, large set
-of changes, large set of commits and long-running session.saves.
-
-The following is an illustration of the impact of large cluster delays:
-
-![discovery.impl split brain](discovery-impl-split-brain.png =360x)
-
-In discovery.impl 1.2.2 several improvements have been done to avoid pseudo-network partitioning including the following:
-(see SLING-3432 for more in-depth details)
-
-* SLING-5195 : monitor the HeartbeatHandler for long-running session.saves.
-* SLING-5280 : reduce synchronization for HeartbeatHandler to avoid other threads blocking it
-* SLING-5030 : avoid "isolated mode" and replace it with larger TOPOLOGY_CHANGING phase
-
-All of the above greatly reduce the likelyhood of pseudo-network partitioning with `discovery.impl`, however, as
-also described in SLING-4640, there is still a small time-window in which it cannot be ruled out entirely.
-The successor of discovery.impl, the `discovery.oak` bundle, addresses these concerns to avoid pseudo-network
-partitioning alltogether.
-
-In the context of `discovery.impl` it is therefore paramount that the underlying repository is monitored and optimized
-such that the delays are well under control and do not exceed the configured heartbeat timeout.
-
-### Topology Connectors for Cross-Cluster Discovery
-
-From a discovery API's point of view a cluster consists of all instances that are connected to the same repository.
-The above described built-in mechanism of storing a lastHeartbeat property into the (shared) repository, of voting on changes
-and creating an explicit establishedView results in automatic discovery within a cluster. There is therefore
-no further configuration needed for discovering instances in the same cluster.
-
-However, for discovering multiple clusters such an automatic discovery is not possible and the clusters need
-to be explicitly configured using (cross-cluster) topology connectors:
-
-A topology connector is a periodically issued HTTP PUT that announces the part of the topology known to the
-sending instance to the receiving instance and vica-verca the receiving instance announces its part of the
-topology to the sender in the response of the very same HTTP PUT. This way whatever other clusters are connected
-to sender or receiver will be made known to each other. Such a 'topology announcement' will be valid either until
-the same sender sends the announcement again (which it does periodically) - or until it times out (configurable).
-A topology connector is by definition always between clusters, never within the same cluster. Topology connectors
-can be structured in an arbitrary way (chain, star, tree, etc) with the only important point to note here that
-since changes in the topology propagate through these topology connectors they have a certain delay (namely
-the configured heartbeatInterval per hop).
-
-Topology connectors are configured at [/system/console/configMgr/org.apache.sling.discovery.impl.Config][1].
-They use the same interval and timeout as the repository heartbeats (heartbeatInterval and heartbeatTimeout).
-
-### WebConsole
-
-A Felix WebConsole plugin at [/system/console/topology][2] provides a (read-only) overview of the topology.
-
-### Configuration
-
-The following properties can be configured (at [/system/console/configMgr/org.apache.sling.discovery.impl.Config][1]):
-
-* 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.
-
-
-[1]: http://localhost:8888/system/console/configMgr/org.apache.sling.discovery.impl.Config
-[2]: http://localhost:8888/system/console/topology
-
-
-## discovery.oak: Oak-based, OOTB-implementation
-
-When running discovery.impl ontop of an eventually consistent repository (such as documentMK of oak), the heartbeat mechanism
-becomes unreliable. The eventual-ness of the repository has an inherent problem in that it doesn't guarantee by when a change
-initiated from instance A is visible by instance B. And when there are no hard guarantees, it becomes impossible to choose
-a `heartbeatTimeout` that works for all eventualities.
-
-Therefore it becomes necessary to be able to store heartbeats in a (low-level) location that provides higher consistency (than eventualness).
-Such a 'low-level location' is the DocumentStore of oak (which is an internal API of the DocumentNodeStore). Turns out that
-the DocumentNodeStore already has a heartbeat-like concept called leases. Those can be re-used for discovery to fulfill the same
-aspect as heartbeats do: indicate alive instances. This can further be combined with
-an explicit materialization of a "cluster view" in the DocumentStore so that all instances agree and refer to the same
-view without the actual need for voting (this is possible since the DocumentStore allows to do conditional updates).
-
-### Jackrabbit Oak's discovery-lite
-
-All of the above mentioned features have been implemented in so-called 'discovery-lite': Discovery-lite is a simplified
-version of discovery on the oak level. Other than the discovery API it only provides one thing, and that's the
-clusterview-json:
-
-#### 'oak.discoverylite.clusterview'
-
-The discovery-lite descriptor `oak.discoverylite.clusterview` is a shrink-wrapped json-formatted object representing
-the current state of the cluster. It contains the following:
-
-* `active`: a list of active nodes in the documentNodeStore cluster
-* `deactivating`: a list of nodes that are in the process of being deactivated
-* `inactive`: a list of nodes that are inactive
-* `me`: the id (number) of the local instance (which is always part of the active nodes)
-* `id`: the id (unique, persistent) of the cluster (which thus survives node/cluster restarts)
-* `seq`: a sequence number that is incremented upon each change in this descriptor (to be able to identify a change even if
-the other values are unchanged) and shared amongst all instances in the cluster, ie all instances see the same sequence number.
-This number can thus be used by upper layers to identify this particular incarnation of clusterview.
-* `final`: when this flag is `false` it indicates that the sequence number has changed (as well as eg `active` and `inactive`),
-but that the local instance has not yet fully processed this changed on a low-level. I.e. it marks that the local
-instance has not yet read the entire back-log of another, deactivating instance. Thus when `final==false`, the upper layers
-should wait until `final==true`, at which point they know oak has finished processing an instance crashing/shutting down.
-
-#### Accessing discovery-lite
-
-The `oak.discoverylite.clusterview` descriptor is exposed as a JCR repository descriptor and can be accessed like so:
-
-getRepository().getDescriptor("oak.discoverylite.clusterview")
-
-which will return the json-formatted clusterview as described above.
-
-Note however, that this API is not meant to be a public, stable API and changes will be done without prior notice.
-It is merely an internal information exposed by oak and not standardized nor guaranteed to remain supported or unchanged!
-
-### Sling's discovery.oak
-
-discovery.oak is a implementation of the discovery API that now makes use of this new discovery-lite descriptor in oak.
-It basically delegates the detection of the instances in the local cluster to discovery-lite. To do so, it periodically
-reads this descriptor (which is designed to be read at a high-frequency without problems) and triggers `TopologyEvents`
-when this descriptor changes.
-
-The advantage of using discovery-lite (which uses oak leases) instead of writing heartbeats into the repository
-is that discovery.oak thus becomes independent of the speed/latency that the repository can produce under high load.
-The discovery-lite should be entirley resilient to high load, thus is discovery.oak.
-
-Additionally, it reuses functionality from discovery.impl, such as the way properties (from `PropertyProviders`) or
-cross-cluster topology announcements (via topology connectors) are handled.
-
-In order to do this, the discovery.impl bundle has been refactored as follows:
-
-#### discovery.commons
-
-This is a bundle usable by any implementation of discovery and contains very basic, implementation-independent functionality
-
-#### discovery.base
-
-This is the base bundle solely used by discovery.impl and discovery.oak and contains exactly the mentioned
-properties and announcement handling.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/discovery-impl-split-brain.png
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/discovery-impl-split-brain.png b/content/documentation/bundles/discovery-impl-split-brain.png
deleted file mode 100644
index d14c7fe..0000000
Binary files a/content/documentation/bundles/discovery-impl-split-brain.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/dynamic-includes.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/dynamic-includes.md b/content/documentation/bundles/dynamic-includes.md
deleted file mode 100644
index 54a4b77..0000000
--- a/content/documentation/bundles/dynamic-includes.md
+++ /dev/null
@@ -1,27 +0,0 @@
-title=Apache Sling Dynamic Include
-type=page
-status=published
-~~~~~~
-Notice: Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-.
-http://www.apache.org/licenses/LICENSE-2.0
-.
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-Sling Dynamic Include (org.apache.sling.dynamic-include)
-========================================================
-For now the Sling Dynamic Include documentation can be found
-[in the Sling codebase](https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/sling-dynamic-include/README.md)
-or
-[on our GitHub mirror](https://github.com/apache/sling/tree/trunk/contrib/extensions/sling-dynamic-include) if that's in sync.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/file-installer-provider.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/file-installer-provider.md b/content/documentation/bundles/file-installer-provider.md
deleted file mode 100644
index 9332f83..0000000
--- a/content/documentation/bundles/file-installer-provider.md
+++ /dev/null
@@ -1,42 +0,0 @@
-title=File Installer Provider
-type=page
-status=published
-~~~~~~
-
-The file installer provider scans configured directories and provides the found artifacts (files) to the [OSGI installer](/documentation/bundles/osgi-installer.html). The functionality is very similar to Apache Felix FileInstall, with the major difference that this service implements just the task of scanning a file directory. All the management logic is implemented in the OSGi installer and support of various artifact types like bundles, configurations or custom formats is implemented by plugins for the OSGi installer.
-
-
-## Setup
-
-The file installer can be configured with these framework (system) properties:
-
-|Property|Default|Description|
-|--|--|--|
-|`sling.fileinstall.dir`| |The name/path of the directories to watch. Several directories can be specified by using a comma separated list. Each directory might have arbitrarily many sub directories (even nested ones) which may contain the artifacts|
-|`sling.fileinstall.interval`|5000 ms|Number of milliseconds between 2 polls of the directory|
-|`sling.fileinstall.writeback`|true|If the file provider supports writeback of changed artifacts, e.g. if a configuration is changed through Config Admin the change is written back to the file system.|
-
-## Bundles
-
-Bundles are supported by the OSGi installer. If a bundle jar is added to a scanned directory, this bundle is installed. If the file is updated/changed, the bundle is updated. If the file is removed, the bundle gets removed.
-Of course, these are the simple rules. The actual action depends by the overall state of the system and is controlled by the OSGi installer. For example if already the same bundle with a higher version is installed, when a bundle is dropped into the install folder, the OSGi installer will perform no operation.
-
-Start levels are supported as well by creating a directory with the name of the start level within the scan directory and putting the bundles within this directory. For example, if the `install` folder is scanned, the bundle `install/3/mybundle.jar` will be installed with start level 3. Without such a directory the default start level is used.
-
-## Configurations
-
-Configurations are handled by the [Configuration Installer Factory](/documentation/bundles/configuration-installer-factory.html). The different formats are described there.
-
-## Custom Artifacts
-
-Custom artifacts are handled by the OSGi installer depending on the installed plugins. Have a look at the OSGi installer and its plugins for more information.
-
-## Runmode Support
-
-The file installer supports run modes for installing artifacts (added with [SLING-4478](https://issues.apache.org/jira/browse/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.
-
-You can even combine start level and run mode support. Just pay attention that the run mode foldername must be set on a direct child folder of `sling.fileinstall.dir` while the start level must be set directly on the parent folder of the artifact you want to install. E.g. `<sling.fileinstall.dir>/install.a1.dev/3/mybundle.jar` will only be considered if both run modes `a1` and `dev` are set. If this is the case then the according artifact will be installed in start level 3.
-
-# Project Info
-
-* File installer provider ([org.apache.sling.installer.provider.file](http://svn.apache.org/repos/asf/sling/trunk/installer/providers/file))
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/internationalization-support-i18n.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/internationalization-support-i18n.md b/content/documentation/bundles/internationalization-support-i18n.md
deleted file mode 100644
index 49961ca..0000000
--- a/content/documentation/bundles/internationalization-support-i18n.md
+++ /dev/null
@@ -1,177 +0,0 @@
-title=Internationalization Support (i18n)
-type=page
-status=published
-~~~~~~
-
-Internationalization support in Sling consists of four methods in the `SlingHttpServletRequest` interface:
-
-* `getLocale()` -- Returns the primary `Locale` for the current request. This method is inherited from the `javax.servlet.ServletRequest` interface.
-* `getLocales()` -- Returns the `Locale` instances for the current request. This method is inherited from the `javax.servlet.ServletRequest` interface.
-* `getResourceBundle(Locale)` -- Returns a `ResourceBundle` for the given `Locale`. This method is specific to Sling.
-* `getResourceBundle(String, Locale)` -- Returns a `ResourceBundle` of a given base name for the given `Locale`. This method is specific to Sling.
-
-
-These methods have a default implementation in the `org.apache.sling.core` bundle and an extended and extensible implementation in the `org.apache.sling.i18n` bundle.
-
-
-## Default Implementation in the `org.apache.sling.engine` Bundle
-
-The default implementation of the above mentioned four methods in the Sling Engine bundle is contained in the bundle-private class `org.apache.sling.engine.impl.SlingHttpServletRequestImpl` which is the primary implementation of the `SlingHttpServletRequest` interface:
-
-* `getLocale()` -- Returns the `Locale` from the request object of the servlet container in which Sling is running. As per the Servlet API specification, this is either the primary Locale of the `Accept-Language` request header or the server default locale.
-* `getLocales()` -- Returns the `Enumeration` from the request object of the servlet container in which Sling is running. As per the Servlet API specification, this is either based on the `Accept-Language` request header or just the server default locale.
-* `getResourceBundle(Locale)` -- Returns a `ResourceBundle` whose `getString(String key)` method returns the `key` as the message and whose `getKeys()` method returns an empty `Enumeration`.
-* `getResourceBundle(String, Locale)` -- Returns a `ResourceBundle` whose `getString(String key)` method returns the `key` as the message and whose `getKeys()` method returns an empty `Enumeration`.
-
-
-NOTE: Unlike the default implementations of the `ResourceBundle` abstract class in the Java Runtime -- `PropertyResourceBundle` and `ListResourceBundle` -- the `ResourceBundle` returned by the default implementation of the `getResourceBundle(Locale)` and `getResourceBundle(String, Locale)` always returns a string message for any key, which is the key itself. This prevents throwing `MissingResourceException`.
-
-
-
-## Extensible Implementation in the `org.apache.sling.i18n` Bundle
-
-The `org.apache.sling.i18n` Bundle implements a request level `Filter` providing extensible implementations of the above mentioned three methods. Extensibility is attained by defining two service interfaces:
-
-* `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.
-
-
-
-### JCR Repository based `ResourceBundleProvider`
-
-The sling.i18n Bundle provides the implementation of the `ResourceBundleProvider` interface, which may also be used outside of Sling requests for service tasks. This implementation gets the messages from a JCR Repository stored below nodes of the mixin node type `mix:language`. These language nodes have a `jcr:language` property naming the language of the resources. In the context of the JCR based `ResourceBundleProvider` this is of course expected to be the string value of respective `Locale`. The format may either be the format as described in [Locale.toString](http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#toString%28%29) or as described in [BCP 47](https://tools.ietf.org/html/bcp47), while for the latter you may only provide ISO 3166-1 country codes (for the region) and ISO 639-1 alpha 2 language codes (for the language). Both formats are also accepted in lower-case.
-
-The exact location of these nodes is not relevant as the `ResourceBundleProvider` finds them by applying a JCR search.
-
-Two different types of storage formats are supported for the individual dictionaries
-
-#### `sling:MessageEntry` based
-
-The (direct) child nodes of the `mix:language` node must have the `jcr:primaryType` set to `sling:MessageEntry` and must contain two special properties naming the key string and the message:
-
-* `sling:key` -- The `sling:key` property is a string property being the key for which the node contains the message(s). This property is optional. If it is not set the key is determined by the name of this `sling:messageEntry` resource.
-* `sling:message` -- The `sling:message` property represents the resource for the key.
-
-It is only required that the message nodes are located below `mix:language` nodes. Such structures may also be scattered in the repository to allow storing message resources next to where they are most likely used, such as request scripts.
-
-##### Sample Resources
-
-Content for dictionaries in this format might look like this:
-
-/libs/languages
-+-- English (nt:folder, mix:language)
-| +-- jcr:language = en
-| +-- m1 (sling:MessageEntry)
-| | +-- sling:key = "msg001"
-| | +-- sling:message = "This is a message"
-| +-- m2 (sling:MessageEntry)
-| +-- sling:key = "msg002"
-| +-- sling:message = "Another message"
-+-- Deutsch (nt:folder, mix:language)
-+-- jcr:language = de
-+-- m1 (sling:MessageEntry)
-| +-- sling:key = "msg001"
-| +-- sling:message = "Das ist ein Text"
-+-- m2 (sling:MessageEntry)
-+-- sling:key = "msg002"
-+-- sling:message = "Ein anderer Text"
-
-/apps/myApp
-+-- English (nt:folder, mix:language)
-| +-- jcr:language = en
-| +-- mx (sling:MessageEntry)
-| +-- sling:key = "msgXXX"
-| +-- sling:message = "An Application Text"
-+-- Deutsch (nt:folder, mix:language)
-+-- jcr:language = de
-+-- mx (sling:MessageEntry)
-+-- sling:key = "msgXXX"
-+-- sling:message = "Ein Anwendungstext"
-
-This content defines two languages *en* and *de* with three messages *msg001*, *msg002* and *msgXXX* each. The names of the respective resources have no significance (in case the `sling:key` is set).
-
-#### JSON-file based
-
-Since Version 2.4.2 the i18n bundle supports dictionaries in JSON-format ([SLING-4543](https://issues.apache.org/jira/browse/SLING-4543)).
-Since loading such dictionaries is much faster than loading the ones based on `sling:MessageEntry`s this format should be used preferably.
-This format is assumed if the `mix:language` resource name is ending with the extension `.json`.
-The parser will take any "key":"value" pair in the JSON file, including those in nested objects or arrays. Normally, a dictionary will be just a single json object = hash map though.
-
-##### Sample Resources
-
-Content for this format might look like this:
-
-/libs/languages
-+-- english.json (nt:file, mix:language)
-| +-- jcr:language = en
-| +-- jcr:content (nt:resource)
-| + jcr:data (containing the actual JSON file)
-+-- deutsch.json (nt:file, mix:language)
-+-- jcr:language = de
-+-- jcr:content (nt:resource)
-+ jcr:data (containing the actual JSON file)
-
-
-#### JCR Node Types supporting the JCR Repository based `ResourceBundleProvider`
-
-The sling.i18n bundle asserts the following node types:
-
-[mix:language]
-mixin
-- jcr:language (string)
-
-
-The `mix:language` mixin node type allows setting the `jcr:language` property required by the `ResourceBundleProvider` implementation to identify the message `Locale`.
-
-[sling:Message]
-mixin
-- sling:key (string)
-- sling:message (undefined)
-
-[sling:MessageEntry] > nt:hierarchyNode, sling:Message
-
-
-The `sling:Message` and `sling:MessageEntry` are helper node types. The latter must be used to create the nodes for the `sling:MessageEntry` based format.
-
-### `ResourceBundle` with base names
-
-Similar to standard Java `ResourceBundle` instances, Sling `ResourceBundle` instances may be created for base names through any of the `getResourceBundle(String, Locale)` methods. These methods use the base name parameter as a selector for the values of the `sling:basename` property of the `mix:language` nodes.
-
-The base name argument can take one three values:
-
-| Value | `ResourceBundle` selection |
-|--|--|
-| `null` | Selects messages of `mix:language` nodes ignoring the existence or absence of `sling:basename` properties |
-| Empty String | Selects messages of `mix:language` nodes which have `sling:basename` properties, ignoring the actual values |
-| Any other Value | Selects messages of `mix:language` nodes whose `sling:basename` properties has any value which matches the base name string |
-
-The `sling:basename` property may be multi-valued, that is the messages of a `mix:language` nodes may belong to multiple base names and thus `ResourceBundle` instances.
-
-### `ResourceBundle` hierarchies
-The dictionary entries for one `JcrResourceBundle` are always ordered like the resource resolver search paths, so usually
-
-1. dictionary entries below `/apps`
-2. dictionary entries below `/libs`
-3. dictionary entries anywhere else (outside the search path)
-
-That means that the message for the same key in `/apps` overwrites the one in `/libs` (if both are for the same locale and base name). Within those categories the order is non-deterministic, so if there is more than one entry for the same key in `/apps/...` (for the same locale and base name), any of those entries may be used.
-
-The resource bundles of the same base name with different locales also form a hierarchy. Each key is looked up recursively first in the current resource bundle and then in its parent resource bundle. The parent resource bundle is the one having the same base name but the parent locale.
-
-The locale hierarchy is ordered like this:
-
-1. `<Language> <Country> <Variant>`
-2. `<Language> <Country>`
-3. `<Language>`
-4. `<Default Locale>`, usually `en`
-
-So for the locale `de-DE-MAC` the fallback order would be
-
-1. `de-DE-MAC`
-2. `de-DE`
-3. `de`
-4. `en`
-
-In case there is a resource bundle requested for a locale without country or variant, there is only 1 fallback (i.e. the default locale).
-The last resort (root resource bundle in all hierarchies) is always the bundle which returns the requested key as the value.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/jconsole-hc.jpg
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/jconsole-hc.jpg b/content/documentation/bundles/jconsole-hc.jpg
deleted file mode 100644
index 4087cf9..0000000
Binary files a/content/documentation/bundles/jconsole-hc.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/jcr-installer-provider.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/jcr-installer-provider.md b/content/documentation/bundles/jcr-installer-provider.md
deleted file mode 100644
index 73fc668..0000000
--- a/content/documentation/bundles/jcr-installer-provider.md
+++ /dev/null
@@ -1,149 +0,0 @@
-title=JCR Installer Provider
-type=page
-status=published
-~~~~~~
-
-The JCR installer provider scans the JCR repository for artifacts and provides them to the [OSGI installer](/documentation/bundles/osgi-installer.html).
-
-## Configuration and Scanning
-
-The JCR installer provider can be configured with weighted paths which are scanned. By default, the installer scans in */apps* and */libs* where artifacts found in */apps* get a higher priority. The installer does a deep scan and uses a regular expression to detect folders containing artifacts to be installed. By default, artifacts from within a folder named *install* are 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](/documentation/bundles/configuration-installer-factory.html)) this is provided to the OSGi installer.
-
-In addition every node of type *sling:OsgiConfig* is provided as a configuration to the installer. This has the advantage of leveraging the JCR structure better than binary files, but has the known limitations outlined in [SLING-4183](https://issues.apache.org/jira/browse/SLING-4183) and [SLING-2477](https://issues.apache.org/jira/browse/SLING-2477), therefore it is recommended to stick to one of the binary formats described in [Configuration Installer Factory](/documentation/bundles/configuration-installer-factory.html).
-
-The JCR installer provider does not check or scan the artifacts itself, the detection and installation is deferred to the OSGi installer.
-
-### Runmode Support
-
-The JCR installer supports run modes for installing artifacts. By default folders named *install* are checked for artifacts. If Apache Sling is started with one (or more run modes), all folders named *install.[RUNMODE]* are scanned as well. To be precise, the folder name can be followed by any number of run modes separated by comma. For example, if started with run modes *dev*, *a1*, and *public*, folders like *install.dev*, *install.a1*, *install.public* are searched as well as *install.dev.a1*, or *install.a1.dev*.
-
-Artifacts from folders with a run mode get a higher priority. For example by default, an *install* folder underneath */libs* gets the priority *50*. For each run mode in the folder name, this priority is increased by *1*, so *install.dev* has *51* and *install.a1.dev* is *52*.
-
-## 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](/documentation/bundles/configuration-installer-factory.html).
-
-Write back can be turned off by configuration.
-
-### 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](https://issues.apache.org/jira/browse/SLING-2011)). So e.g. a bundle in the path `/libs/sling/install/15/somebundle.jar` is having the start level **15**.
-
-# Example
-Here's a quick walkthrough of the JCR installer functionality.
-
-## Installation
-Start the Sling [launchpad/app](http://svn.apache.org/repos/asf/sling/trunk/launchpad/app) and make sure that the following bundles are present and started:
-* [RunMode service]({{ refs.run-modes-org-apache-sling-runmode.path }})
-* OSGi installer service ([org.apache.sling.installer.core](http://svn.apache.org/repos/asf/sling/trunk/installer/core))
-* JCR installer provider ([org.apache.sling.installer.provider.jcr](http://svn.apache.org/repos/asf/sling/trunk/installer/providers/jcr))
-
-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
-
-We'll use the [Knopflerfish Desktop](http://www.knopflerfish.org/releases/2.0.5/jars/desktop_awt/desktop_awt_all-2.0.0.jar) bundle for this example, it is convenient as it displays a graphical user interface when started.
-
-We use `curl` to create content, to make it easy to reproduce the example by copying and pasting the `curl` commands. Any other way to create content in the repository will work, of course.
-
-By default, JCRInstall picks up bundles found in folders named *install* under `/libs` and `/apps`, so we start by creating such a folder:
-
-
-curl -X MKCOL http://admin:admin@localhost:8888/apps/jcrtest
-curl -X MKCOL http://admin:admin@localhost:8888/apps/jcrtest/install
-
-
-And we copy the bundle to install in that folder (a backslash in command lines means *continued on next line*):
-
-
-curl -T desktop_awt_all-2.0.0.jar http://admin:admin@localhost:8888/apps/jcrtest/install/desktop_awt_all-2.0.0.jar
-
-
-That's it. After 2-3 seconds, the bundle should be picked up by JCRInstall, installed and started. If this works you'll see a small *Knopflerfish Desktop* window on your desktop, and Sling's OSGi console can of course be used to check the details.
-
-Removing the bundle from the repository will cause it to be uninstalled, so:
-
-
-curl -X DELETE http://admin:admin@localhost:8888/apps/jcrtest/install/desktop_awt_all-2.0.0.jar
-
-
-Should cause the *Knopflerfish Desktop* window to disappear as the bundle is uninstalled.
-
-
-## Install, modify and remove a configuration
-JCRInstall installs OSGi configurations from nodes having the *sling:OsgiConfig* node type, found in folders named *install* under the installation roots (/apps and /libs).
-
-Let's try this feature by creating a configuration with two properties:
-
-
-curl -F "jcr:primaryType=sling:OsgiConfig" -F foo=bar -F works=yes http://admin:admin@localhost:8888/apps/jcrtest/install/some.config.pid
-
-
-And verify the contents of our config node:
-
-curl http://admin:admin@localhost:8888/apps/jcrtest/install/some.config.pid.json
-
-
-Which should display something like
-
-{"foo":"bar",
-"jcr:created":"Wed Aug 26 2009 17:06:40GMT+0200",
-"jcr:primaryType":"sling:OsgiConfig","works":"yes"}
-
-
-At this point, JCRInstall should have picked up our new config and installed it. The logs would confirm that, but we can also use the OSGi console's config status page (http://localhost:8888/system/console/config) to check it. That page should now contain:
-
-
-PID=some.config.pid
-BundleLocation=Unbound
-_jcr_config_path=jcrinstall:/apps/jcrtest/install/some.config.pid
-foo=bars
-service.pid=some.config.pid
-works=yes
-
-
-Indicating that the configuration has been installed.
-
-Let's try modifying the configuration parameters:
-
-
-curl -F works=updated -F even=more http://admin:admin@localhost:8888/apps/jcrtest/install/some.config.pid
-
-
-And check the changes in the console page:
-
-
-PID=some.config.pid
-BundleLocation=Unbound
-_jcr_config_path=jcrinstall:/apps/jcrtest/install/some.config.pid
-even=more
-foo=bars
-service.pid=some.config.pid
-works=updated
-
-
-We can now delete the configuration node:
-
-
-curl -X DELETE http://admin:admin@localhost:8888/apps/jcrtest/install/some.config.pid
-
-
-And verify that the corresponding configuration is gone in the console page (after 1-2 seconds, like for all other JCRInstall operations).
-
-A node named like `o.a.s.foo.bar-a` uses *o.a.s.foo.bar* as its factory PID creating a configuration with an automatically generated PID. The value of *a* is stored as an alias in the OSGi installer to correlate the configuration object with the repository node.
-
-# Automated Tests
-The following modules contain lots of automated tests (under `src/test`, as usual):
-
-* OSGi installer integration tests ([org.apache.sling.installer.it](http://svn.apache.org/repos/asf/sling/trunk/installer/it))
-* JCR installer service ([org.apache.sling.installer.providers.jcr](http://svn.apache.org/repos/asf/sling/trunk/installer/providers/jcr))
-
-Many of these tests are fairly readable, and can be used to find out in more detail how these modules work.
-
-# Project Info
-
-* JCR installer provider ([org.apache.sling.installer.provider.jcr](http://svn.apache.org/repos/asf/sling/trunk/installer/providers/jcr))
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/log-tracers.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/log-tracers.md b/content/documentation/bundles/log-tracers.md
deleted file mode 100644
index b6630a5..0000000
--- a/content/documentation/bundles/log-tracers.md
+++ /dev/null
@@ -1,243 +0,0 @@
-title=Log Tracer
-type=page
-status=published
-~~~~~~
-
-[Log Tracer][SLING-4739] provides support for enabling the logs for specific category at specific
-level and only for specific request. It provides a very fine level of control via config provided
-as part of HTTP request around how the logging should be performed for given category.
-
-This is specially useful for those parts of the system which are involved in every request.
-For such parts enabling the log at global level would flood the logs and create lots of noise.
-Using Tracer one can enable log for that request which is required to be probed.
-
-For e.g. determining what nodes are written for a given POST request can be simply done by including
-an extra request parameters.
-
-curl -D - -u admin:admin -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" http://localhost:4502/content/dam/
-
-## Configuration
-
-![Tracer Config](/documentation/bundles/tracer-config.png)
-
-**Note that by default Tracer would not be enabled and you would need to save the OSGi config to
-get it activated**
-
-Tracer support two ways to enable logging.
-
-### Tracer Sets
-
-Tracer sets are collection of predefined logging categories matching specific area of an application.
-These can for now be configured as part of OSGi config
-
-oak-query : org.apache.jackrabbit.oak.query.QueryEngineImpl;level=debug
-auth : org.apache.sling.auth;level=trace,org.apache.jackrabbit.oak.security
-
-The config is of following format
-
-< set name > : <tracer config>
-
-Where the config is of following format
-
-tracerConfig := loggerConfig ( ',' loggerConfig) *
-loggerConfig := loggerName (; attributes)*
-attributes := attributeName '=' attributeValue
-
-Currently following attributes are support
-
-* `level` - Either of TRACE, DEBUG, INFO, WARN, ERROR
-* `caller` - Used to dump stacktrace of caller. It can have following value (_since 1.0.0_, [SLING-5505][SLING-5505])
-* `true` - Complete call stack for that logger would be included
-* `<depth>` - Call stack upto depth (integer) would be included e.g. caller=5
-* `caller-exclude-filter` - (optional) - '|' separated package prefixes which should not be
-included in the output. e.g. _org.apache.jackrabbit.oak.query.QueryImpl;caller=28;caller-exclude-filter="org.eclipse|org.felix"_
-this would exclude eclipse and felix packages from the resulting stack
-
-### Performance Impact
-
-Tracer makes use of [Logback TuboFilter][1] to intercept the logging calls and only enable them for
-those which are enabled via tracer config for the request. The filter is only registered for the
-duration of that request hence would avoid adding the cost for normal run.
-
-You can also disable the Tracer completely via OSGi config.
-
-## Where do logs go
-
-The logs captured are logged at two places
-
-### RequestProgressTracker
-
-Sling provides support for recording recent requests which can be accessed via [Recent Requests
-Plugin][2]. It would list down the list of recent request and then on clicking them you can see the
-logs showed on the UI.
-
-The logging there is done via [RequestProgressTracker][3] ([intro][4]). By default recent request
-plugin gets overflown as it captures request even for css, js files. To avoid that you can modify
-the config as part of _Sling Main Servlet_ config
-
-![Sling Main Servlet Config](/documentation/bundles/sling-main-servlet-config.png)
-
-Using a regex like ```^.*.(?!jpg$|png$|js$|css$|woff$)[^.]+$``` would avoid noise
-
-With that you can see log entries like below at http://localhost:8080/system/console/requests?index=xxx
-
-132 (2015-05-11 17:39:55) LOG [JCR] Query SELECT * FROM [granite:InboxItem] AS s where status='ACTIVE' ORDER BY s.startTime DESC
-134 (2015-05-11 17:39:55) TIMER_END{53,/libs/cq/gui/components/endor/badge/badge.jsp#18}
-...
-1316 (2015-05-11 17:39:56) LOG JCR Query Count 3
-1320 (2015-05-11 17:39:56) TIMER_END{1320,Request Processing} Request Processing
-
-### Server Logs
-
-Further the logs also go to normal server side logs. By default they would go to the error.log. If
-you have routed the logs of specific categories to different files then normal Logback logging rules
-would apply
-
-## Usage
-
-Tracing can be done in various ways for a given HTTP request. Tracer looks for following hints as part of request
-
-* Tracer set names - Comma separated list of tracer set names which need to be enabled. e.g. `oak-query, oak-writes` etc
-* tracerConfig - Raw tracing config only used for that specific request
-
-### Request Parameters
-
-Param names
-
-* `tracers` - Tracer set names
-* `tracerConfig` - Tracer config like org.apache.sling.auth;level=trace`
-
-curl -u admin:admin http://localhost:4802/projects.html?tracerConfig=org.apache.sling
-
-Above request would turn on debug level logging (default level for tracer) for `org.apache.sling` category.
-
-curl -D - -u admin:admin -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" http://localhost:4502/content/dam/
-
-Above request would create a folder in Assets and for that we have enabled the `oak-writes` tracer. This would result in following output
-
-2015-05-11 17:30:42,840 INFO admin [127.0.0.1 [1431345642836] POST /content/dam/ HTTP/1.1] c.a.acs.acs-aem-tools-bundle - Service [4858] ServiceEvent REGISTERED
-2015-05-11 17:30:42,846 TRACE admin [127.0.0.1 [1431345642836] POST /content/dam/ HTTP/1.1] o.a.j.o.jcr.operations.writes session-12895- [session-12895] Adding node [/content/dam/summer-collection]
-2015-05-11 17:30:42,849 TRACE admin [127.0.0.1 [1431345642836] POST /content/dam/ HTTP/1.1] o.a.j.o.jcr.operations.writes session-12895- [session-12895] setPrimaryType
-2015-05-11 17:30:42,849 TRACE admin [127.0.0.1 [1431345642836] POST /content/dam/ HTTP/1.1] o.a.j.o.jcr.operations.writes session-12895- [session-12895] Adding node [/content/dam/summer-collection/jcr:content]
-2015-05-11 17:30:42,849 TRACE admin [127.0.0.1 [1431345642836] POST /content/dam/ HTTP/1.1] o.a.j.o.jcr.operations.writes session-12895- [session-12895] Setting property [/content/dam/summer-collection/jcr:content/jcr:title]
-2015-05-11 17:30:42,850 TRACE admin [127.0.0.1 [1431345642836] POST /content/dam/ HTTP/1.1] o.a.j.o.jcr.operations.writes session-12895- [session-12895] setPrimaryType
-2015-05-11 17:30:42,850 TRACE admin [127.0.0.1 [1431345642836] POST /content/dam/ HTTP/1.1] o.a.j.o.jcr.operations.writes session-12895- [session-12895] setPrimaryType
-2015-05-11 17:30:42,856 TRACE admin [127.0.0.1 [1431345642836] POST /content/dam/ HTTP/1.1] o.a.j.o.jcr.operations.writes session-12895- [session-12895] save
-
-### Request Headers
-
-Some request like initial authentication processing does not involve Sling MainServlet and hence for
-those request logging cannot be done to RequestProgressTracker. Instead we can just get logs enabled
-and route them to normal logging on server side. For that you need to use HTTP header
-
-* `Sling-Tracers` - Set of tracer set names
-* `Sling-Tracer-Config` - Tracer config
-
-So to enable authentication related logging following request can be sent
-
-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" http://localhost:8080/libs/content/login.html/j_security_check
-
-This would result in following server side logs
-
-2015-05-11 17:34:56,531 INFO NA [qtp1395423247-193] c.a.acs.acs-aem-tools-bundle - Service [4859] ServiceEvent REGISTERED
-2015-05-11 17:34:56,532 DEBUG NA [qtp1395423247-193] o.a.s.a.c.i.SlingAuthenticator - doHandleSecurity: Trying to get a session for null
-2015-05-11 17:34:56,532 DEBUG NA [qtp1395423247-193] o.a.j.o.s.a.LoginContextProviderImpl - Found pre-authenticated subject: No further login actions required.
-2015-05-11 17:34:56,532 DEBUG NA [qtp1395423247-193] o.a.j.o.s.a.LoginContextProviderImpl - Found pre-authenticated subject: No further login actions required.
-2015-05-11 17:34:56,548 DEBUG NA [qtp1395423247-193] o.a.j.o.s.a.u.LoginModuleImpl - Adding Credentials to shared state.
-2015-05-11 17:34:56,548 DEBUG NA [qtp1395423247-193] o.a.j.o.s.a.u.LoginModuleImpl - Adding login name to shared state.
-
-## Tracer Recording
-
-_Since 1.0.0 [SLING-5459][SLING-5459]_
-
-Apart from routing the logs to the server logs they can also be stored in memory and accessed in
-json form from Felix Web Console. By default support for recording is disabled and it needs to be
-explicitly enabled via OSGi config
-
-Recording features works as explained below
-
-1. 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" http://localhost:4802/content/dam/
-
-2. Server includes a request id as part of `Sling-Tracer-Request-Id` response headers
-
-HTTP/1.1 201 Created
-Date: Wed, 27 Jan 2016 07:30:22 GMT
-Sling-Tracer-Request-Id: 9b5b01f6-f269-47c3-a889-2dc8d4d7938f
-X-Content-Type-Options: nosniff
-X-Frame-Options: SAMEORIGIN
-Location: /content/dam/summer-collection
-Content-Type: text/html; charset=UTF-8
-Transfer-Encoding: chunked
-
-3. 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" -u admin:admin http://localhost:4512/assets.html/content/dam -o /dev/null
-
-Below is a json output for GET request
-
-:::javascript
-{
-"method": "GET",
-"time": 15140,
-"timestamp": 1461574009024,
-"requestProgressLogs": [
-"0 TIMER_START{Request Processing}",
-"0 COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>",
-...
-],
-"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)"
-}
-],
-"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"
-]
-}
-...
-]
-}
-
-JSON output consist of following sections
-
-1. `method` - Request method
-2. `time` - Time in mills spent in request processing on server
-3. `timestamp` - Request start time
-4. `requestProgressLogs` - Sling Request Progress Tracker log for the given request
-5. `queries` - List of queries fired along with details around `query`, `plan` and `caller` i.e. from where
-the query is invoked
-6. `logs` - List of log entries captured (as enabled by tracer config) for current request
-
-The recordings are held in memory for 15 mins (per default setting) and can be seen listed at http://localhost:8080/system/console/tracer. Look into the OSGi config for more config options
-around this.
-
-## Installation
-
-Download the bundle from [here][5] or use following Maven dependency
-
-::xml
-<dependency>
-<groupId>org.apache.sling</groupId>
-<artifactId>org.apache.sling.tracer</artifactId>
-<version>1.0.0</version>
-</dependency>
-
-
-[1]: http://logback.qos.ch/manual/filters.html#TurboFilter
-[2]: https://sling.apache.org/documentation/development/monitoring-requests.html
-[3]: https://sling.apache.org/apidocs/sling5/org/apache/sling/api/request/RequestProgressTracker.html
-[4]: http://dev.day.com/content/ddc/blog/2008/06/requestprogresstracker.html
-[SLING-4739]: https://issues.apache.org/jira/browse/SLING-4739
-[SLING-5505]: https://issues.apache.org/jira/browse/SLING-5505
-[SLING-5459]: https://issues.apache.org/jira/browse/SLING-5459
-[5]: http://sling.apache.org/downloads.cgi
[26/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/OLD-from-apache-cms/lib/path.pm
----------------------------------------------------------------------
diff --git a/OLD-from-apache-cms/lib/path.pm b/OLD-from-apache-cms/lib/path.pm
deleted file mode 100644
index 5e95026..0000000
--- a/OLD-from-apache-cms/lib/path.pm
+++ /dev/null
@@ -1,39 +0,0 @@
-package path;
-use ASF::Value;
-
-# taken from django's url.py
-
-our @patterns = (
- [qr!\.mdtext$!, single_narrative => { template => "single_narrative.html" }],
- [qr!^/sitemap\.html$!, sitemap => { headers => { title => "Sling Sitemap" }}],
- [qr!^/downloads\.list$!, downloads => { template => "downloads.html" }],
-) ;
-
-# for specifying interdependencies between files
-
-#our %dependencies = (
-# "/sling/sitemap.html" => [ grep s!^content!!, glob "content/sling/*.mdtext" ],
-#);
-
-1;
-
-=head1 LICENSE
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/OLD-from-apache-cms/lib/view.pm
----------------------------------------------------------------------
diff --git a/OLD-from-apache-cms/lib/view.pm b/OLD-from-apache-cms/lib/view.pm
deleted file mode 100644
index 9770af2..0000000
--- a/OLD-from-apache-cms/lib/view.pm
+++ /dev/null
@@ -1,434 +0,0 @@
-package view;
-
-#
-# BUILD CONSTRAINT: all views must return $content, $extension.
-# additional return values (as seen below) are optional. However,
-# careful use of symlinks and dependency management in path.pm can
-# resolve most issues with this constraint.
-#
-
-use strict;
-use warnings;
-use Dotiac::DTL qw/Template/;
-use Dotiac::DTL::Addon::markup;
-use ASF::Util qw/read_text_file shuffle/;
-use File::Temp qw/tempfile/;
-use LWP::Simple;
-use SVN::Client;
-use File::Find;
-use File::Basename;
-
-push @Dotiac::DTL::TEMPLATE_DIRS, "templates";
-
-# This is most widely used view. It takes a
-# 'template' argument and a 'path' argument.
-# Assuming the path ends in foo.mdtext, any files
-# like foo/bar.mdtext will be parsed and
-# passed to the template in the "bar" (hash)
-# variable.
-
-sub single_narrative {
- my %args = @_;
- my $file = "content$args{path}";
- my $template = $args{template};
- $args{path} =~ s/\.mdtext$/\.html/;
- $args{breadcrumbs} = breadcrumbs($args{path});
- $args{svninfo} = svninfo($file);
-
- read_text_file $file, \%args;
-
- $args{refs} = {};
-
- # render tip box with reference to Confluence export
- # if translation for a page is still pending
- if($args{headers}->{translation_pending}) {
- $args{oldpage} = "/site/" . basename($args{path});
- }
-
- # ensure loading child pages
- my $page_path = $file;
- $page_path =~ s/\.[^.]+$//;
- if (-d $page_path) {
- $args{children} = {};
- for my $f (grep -f, glob "$page_path/*.mdtext") {
- $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
- $args{children}->{$1} = read_ref_page_data($f);
- $args{refs}->{$1} = $args{children}->{$1};
- }
- }
-
- # ensure loading pages referenced with ref.XXX.*
- while( $args{content} =~ /refs\.([^.]+)\./g ) {
- my $label = $1;
- if(!$args{refs}->{$label}) {
- my $refPagePath;
- find(sub {
- if(!$refPagePath && $_ eq "$label.mdtext") {
- $refPagePath = $File::Find::name;
- }
- }, "content");
-
- if($refPagePath) {
- $args{refs}->{$label} = read_ref_page_data($refPagePath);
- }
- }
- }
-
-# $args{sidenav} = {};
-# read_text_file "templates/sidenav.mdtext", $args{sidenav} ;
-
-# select STDOUT ;
-# $| = 1 ;
-# for my $ke (keys %args) {
-# print STDOUT "$ke \n";
-# }
-
- # use the content as a template if it contains Django templates
- if ($args{content} =~ /\{[{%][^}]*[%}]\}/) {
- print STDOUT "Applying $args{path} as a Django template\n";
- $args{content} = Dotiac::DTL->new(\$args{content})->render(\%args);
- }
-
- return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
-}
-
-# The specially crafted download page
-# Input is a list of artifacts formatted as:
-#
-# <title>|<id>|<version>[|<qualifier>]
-#
-# Special handling if title is "sling": This denotes the
-# version of the Sling Launchpad distribution whie is
-# rendered specially: The id is actually the launchpad
-# distribution version
-sub downloads {
- my %args = @_;
- my $file = "content$args{path}";
- my $template = $args{template};
- $args{path} =~ s/\.list$/\.html/;
- $args{breadcrumbs} = breadcrumbs($args{path});
- $args{svninfo} = svninfo($file);
-
- read_text_file $file, \%args;
-
- my $result = "|Artifact | Version | Binary | Source|\n|--|--|--|--|\n";
- my $maven = "|Artifact | Version | Binary | Source|\n|--|--|--|--|\n";
- my $launchpad = "| Artifact | Version | Provides | Package |\n|-|-|-|-|\n";
- my $ide = "|Artifact | Version | Provides | Update site |\n|--|--|--|--|\n";
-
- my @lines = split( /\n/, $args{content} );
- @lines = sort @lines;
- for my $line (@lines) {
- next if (!$line || $line =~ /^\s*#/);
-
- my ($title, $artifact, $version, $classifier, $ext) = split(/\|/, $line);
- $ext = "jar" unless ($ext);
- $classifier = ($classifier) ? "-$classifier" : "";
-
- if ($title eq "sling") {
-
- $launchpad .="| Sling Standalone Application | $artifact | A self-runnable Sling jar. | " . downloadLink("org.apache.sling.launchpad-$artifact.jar"). "|\n";
- $launchpad .="| Sling Web Application | $artifact | A ready-to run Sling webapp as a war file. | " . downloadLink("org.apache.sling.launchpad-$artifact-webapp.war"). "|\n";
- $launchpad .="| Sling Source Release | $artifact | The released Sling source code. | " . downloadLink("org.apache.sling.launchpad-$artifact-source-release.zip")." |\n";
- } elsif ( $title eq "sling-ide-tooling" ) {
-
- $ide .= "| Sling IDE Tooling for Eclipse | $artifact | A p2 update site which can be installed in Eclipse. | " . downloadLinkWithoutSigs("eclipse/$artifact", "Update site") . " " . downloadLink("org.apache.sling.ide.p2update-$artifact.zip", "(zip download)") ." |\n";
- } else {
-
- my $target = \$result;
- my $artifactLabel;
- if ($ext eq "war") {
- $artifactLabel = "Web Application";
- } elsif ($classifier eq "-app") {
- $artifactLabel = "Java Application";
- } elsif ($artifact =~/^maven-.*-plugin|.*-maven-plugin/) {
- $target = \$maven;
- $artifactLabel = "Maven Plugin";
- } else {
- $artifactLabel = "Bundle";
- }
-
- ${$target} .= "|$title|$version|" . downloadLink("$artifact-$version$classifier.$ext", $artifactLabel) . " | " . downloadLink("$artifact-$version-source-release.zip", "Source ZIP") . "|\n";
- }
- }
-
- $args{launchpad} = $launchpad;
- $args{content} = $result;
- $args{maven} = $maven;
- $args{ide} = $ide;
-
- return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
-}
-
-# Has the same behavior as the above for foo/bar.txt
-# files, parsing them into a bar variable for the template.
-# Otherwise presumes the template is the path.
-
-sub news_page {
- my %args = @_;
- my $template = "content$args{path}";
- $args{breadcrumbs} = breadcrumbs($args{path});
-
- my $page_path = $template;
- $page_path =~ s/\.[^.]+$//;
- if (-d $page_path) {
- for my $f (grep -f, glob "$page_path/*.mdtext") {
- $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
- $args{$1} = {};
- read_text_file $f, $args{$1};
- }
- }
-
- for ((fetch_doap_url_list())[0..2]) {
- push @{$args{projects}}, parse_doap($_);
- }
-
- return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
-}
-
-# Recursive Sitemap generation
-# Taken from: http://svn.apache.org/repos/asf/chemistry/site/trunk/lib/view.pm
-sub sitemap {
- my %args = @_;
- my $template = "content$args{path}";
- my $file = $template;
-
- # Find the list of files
- my ($dir) = ($file =~ /^(.*)\/.*?/);
- my $entries = {};
- sitemapFind($dir, $entries);
-
- my $sitemap = "<ul>\n";
- $sitemap = sitemapRender($sitemap, $entries, "");
- $sitemap .= "</ul>\n";
- $args{sitemap} = $sitemap;
-
- return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
-}
-
-sub sitemapFind {
- my ($dir, $entries) = @_;
- $entries->{"title"} = "";
- $entries->{"entries"} = {};
- my %entries = ( "title"=>"", "entries"=>{} );
-
- foreach my $item (<$dir/*>) {
- my ($rel) = ($item =~ /^.*\/(.*?)$/);
-
- if(-d $item) {
- # Only consider folders which have content page by them
- if(-f "$item.mdtext") {
- $rel .= ".mdtext" ;
- $entries->{"entries"}->{$rel} = {};
- sitemapFind($item, $entries->{"entries"}->{$rel});
- }
- } elsif($item =~ /\.(html|mdtext)$/) {
- # Grab the title
- my $title = $rel;
- if($rel =~ /\.mdtext$/) {
- my %args;
- read_text_file $item, \%args;
- $title = $args{"headers"}->{"title"};
- } elsif ($rel =~ /\.png$/ || $rel =~ /\.jpg$/) {
- next;
- } else {
- open F, "<$item";
- my $file = "";
- while(my $line = <F>) {
- $file .= $line;
- }
- close F;
-
- if($file =~ /block\s+title\s*\%\}(.*?)\{/) {
- $title = $1;
- } elsif($file =~ /title\>(.*?)\</) {
- $title = $1;
- }
- }
-
- # Process
- if($rel =~ /^index\.(html|mdtext)$/) {
- $entries->{"title"} = $title;
- } else {
- $entries->{entries}->{$rel}->{title} = $title;
- }
- }
- }
- return %entries;
-}
-
-sub sitemapRender {
- my ($sitemap, $dir, $path) = @_;
- my %entries = %{$dir->{"entries"}};
-
- foreach my $e (sort keys %entries) {
- my $fn = $e;
- $fn =~ s/\.mdtext/.html/;
- if($fn eq "images/" or $fn eq "resources/") {
- next;
- }
-
- my $title = $entries{$e}->{title};
- unless($title) {
- $title = $e;
- }
-
- $sitemap .= "<li><a href=\"$path/$fn\">".$title."</a>";
- if($entries{$e}->{entries}) {
- my $parent = $e;
- $parent =~ s/\.mdtext$//;
- $sitemap .= "<ul>\n";
- $sitemap = sitemapRender($sitemap, $entries{$e}, "$path/$parent");
- $sitemap .= "</ul>\n";
- }
- $sitemap .= "</li>\n";
- }
- return $sitemap;
-}
-
-
-
-sub exports {
- my %args = @_;
- my $template = "content$args{path}";
- $args{breadcrumbs} = breadcrumbs($args{path});
-
- my $page_path = $template;
- $page_path =~ s/\.[^.]+$/.page/;
- if (-d $page_path) {
- for my $f (grep -f, glob "$page_path/*.mdtext") {
- $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
- $args{$1} = {};
- read_text_file $f, $args{$1};
- }
- $args{table} = `xsltproc $page_path/eccnmatrix.xsl $page_path/eccnmatrix.xml`;
-
- }
-
- return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
-}
-
-sub parse_doap {
- my $url = shift;
- my $doap = get $url or die "Can't get $url: $!\n";
- my ($fh, $filename) = tempfile("XXXXXX");
- print $fh $doap;
- close $fh;
- my $result = eval `xsltproc lib/doap2perl.xsl $filename`;
- unlink $filename;
- return $result;
-}
-
-sub fetch_doap_url_list {
- my $xml = get "http://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/files.xml"
- or die "Can't get doap file list: $!\n";
- my ($fh, $filename) = tempfile("XXXXXX");
- print $fh $xml;
- close $fh;
- chomp(my @urls = grep /^http/, `xsltproc lib/list2urls.xsl $filename`);
- unlink $filename;
- shuffle \@urls;
- return @urls;
-}
-
-1;
-
-
-# Reads data of a referenced page
-sub read_ref_page_data {
- my $file = shift;
- my $out = {};
-
- read_text_file $file, $out;
- $out->{path} = "$file";
- $out->{path} =~ s/content(\/.*)\.mdtext/$1.html/;
-
- return $out;
-}
-
-sub downloadLink {
- my ($artifact, $label) = @_;
- my $dp = "http://www.apache.org/dist";
- $label = $artifact unless ($label);
- return "[$label]([preferred]sling/$artifact) ([asc]($dp/sling/$artifact.asc), [md5]($dp/sling/$artifact.md5))";
-}
-
-sub downloadLinkWithoutSigs {
-
- my ($artifact, $label) = @_;
- $label = $artifact unless ($label);
- return "[$label]([preferred]sling/$artifact)";
-}
-
-sub breadcrumbs {
- my @path = split m!/!, shift;
- pop @path;
- my @rv;
- my $relpath = "";
- my $ext;
- my $sep = "/";
- for (@path) {
- $relpath .= "$sep$_";
- if ($_) {
- $_ = "";
- my $datafile = "content$relpath.mdtext";
- my %data;
- if (-f $datafile) {
- read_text_file $datafile, \%data;
- $ext = ".html";
- $sep = "/";
- my $title = ${data{headers}}{title};
- if ($title) {
- $_ = $title;
- }
- }
- } else {
- $_ = "Home";
- $ext = "";
- $sep = "";
- }
- push @rv, qq(<a href="$relpath$ext">$_</a>) if $_;
- }
- return join " » ", @rv;
-}
-
-
-# Returns information on the last change to the file
-# as a reference to a has with three properties
-# - rev The SVN Revision
-# - date The last modification date (seconds since the epoch)
-# - author of the revision
-sub svninfo {
- my $source = $_[0];
- my %info;
- my $receiver = sub {
- my $svninfo = $_[1];
- $info{rev} = $svninfo->last_changed_rev;
- $info{date} = $svninfo->last_changed_date / 1000000;
- $info{author} = $svninfo->last_changed_author;
- };
-
- my $ctx = SVN::Client->new;
- $ctx->info($source, undef, undef, $receiver, 0);
- return \%info;
-}
-
-
-=head1 LICENSE
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/OLD-from-apache-cms/templates/downloads.html
----------------------------------------------------------------------
diff --git a/OLD-from-apache-cms/templates/downloads.html b/OLD-from-apache-cms/templates/downloads.html
deleted file mode 100644
index f9f1cbc..0000000
--- a/OLD-from-apache-cms/templates/downloads.html
+++ /dev/null
@@ -1,93 +0,0 @@
-{% extends "skeleton.html" %}
-{% block title %}Downloads{% endblock %}
-{% block content %}
-<p>
-To get the latest development release of Apache Sling, you can check out
-the <a href="/project-information.html#source-repository">Source Code</a>
-and <a href="/documentation/development/getting-and-building-sling.html">Getting and Building Sling</a>
-yourself. Otherwise, the releases below are available for download. To
-install, just download and extract. The PGP keys at
-<a href="https://people.apache.org/keys/group/sling.asc">https://people.apache.org/keys/group/sling.asc</a>
-can be used to verify the integrity of the release archives.
-</p>
-
-<p>
-All Apache Sling products are distributed under the terms of The Apache
-Software License (version 2.0). See our
-<a href="/project-information/project-license.html">license</a>, or the LICENSE file included
-in each distribution.
-</p>
-
-<div class="toc">
-<ul>
-<li><a href="#mirrors">Mirrors</a></li>
-<li><a href="#application">Sling Application</a></li>
-<li><a href="#ide-tooling">Sling IDE Tooling</a></li>
-<li><a href="#components">Sling Components</a></li>
-<li><a href="#maven">Maven Plugins</a></li>
-</ul>
-</div>
-
-<h2 id="mirrors">Mirrors</h2>
-
-<p>
-Use the links below to download binary or source distributions of Apache
-Sling from one of our mirrors.
-</p>
-
-<p>
-You are currently using <b>[preferred]</b>. If you encounter a problem with
-this mirror, please select another mirror. If all mirrors are failing,
-there are backup mirrors (at the end of the mirrors list) that should be
-available. If the mirror displayed above is labeled <i>preferred</i>, then
-please reload this page by <a href="/downloads.cgi">clicking here</a>.
-</p>
-
-<form action="[location]" method="get" id="SelectMirror">
-<p>Other mirrors: </p>
-<select name="Preferred">
-[if-any http]
-[for http]<option value="[http]">[http]</option>[end]
-[end]
-[if-any ftp]
-[for ftp]<option value="[ftp]">[ftp]</option>[end]
-[end]
-[if-any backup]
-[for backup]<option value="[backup]">[backup] (backup)</option>[end]
-[end]
-</select>
-<input type="submit" value="Change"></input>
-</form>
-
-<h2 id="application">Sling Application</h2>
-
-{{ launchpad|markdown }}
-
-<p>For quick provisioning using docker you can simply run <code>docker pull apachesling/sling</code> to get access to the latest version of the launchpad.</p>
-
-<p>
-To get the latest code you can
-<a href="/documentation/development/getting-and-building-sling.html">build Sling yourself</a>,
-it's not that hard.
-</p>
-
-<p>
-If you are looking for previous releases of Apache Sling, have a look in
-the <a href="http://archive.apache.org/dist/sling/">archives</a>. For previous
-incubator releases of Apache Sling, have a look in the
-<a href="http://archive.apache.org/dist/incubator/sling/">Incubator archives</a>.
-</p>
-
-<h2 id="ide-tooling">Sling IDE Tooling</h2>
-
-<p>If you want to install the convenience binaries for the IDE tooling, it's recommended that you add <a href="[preferred]sling/eclipse">[preferred]sling/eclipse</a> as an update site URL. This way you will receive updates every time a new version is released. For specific versions and zipped update site download, see the table below.</p>
-
-{{ ide|markdown }}
-
-<h2 id="components">Sling Components</h2>
-{{ content|markdown }}
-
-<h2 id="maven">Maven Plugins</h2>
-{{ maven|markdown }}
-
-{% endblock %}
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/OLD-from-apache-cms/templates/force-site-build
----------------------------------------------------------------------
diff --git a/OLD-from-apache-cms/templates/force-site-build b/OLD-from-apache-cms/templates/force-site-build
deleted file mode 100644
index 76aece7..0000000
--- a/OLD-from-apache-cms/templates/force-site-build
+++ /dev/null
@@ -1 +0,0 @@
-http://www.apache.org/dev/cmsref.html#force-site-build
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/OLD-from-apache-cms/templates/sidenav.mdtext
----------------------------------------------------------------------
diff --git a/OLD-from-apache-cms/templates/sidenav.mdtext b/OLD-from-apache-cms/templates/sidenav.mdtext
deleted file mode 100644
index 87131cd..0000000
--- a/OLD-from-apache-cms/templates/sidenav.mdtext
+++ /dev/null
@@ -1,51 +0,0 @@
-**[Documentation](/documentation.html)**
-[Getting Started](/documentation/getting-started.html)
-[The Sling Engine](/documentation/the-sling-engine.html)
-[Development](/documentation/development.html)
-[Bundles](/documentation/bundles.html)
-[Tutorials & How-Tos](/documentation/tutorials-how-tos.html)
-[Configuration](/documentation/configuration.html)
-
-[Wiki](http://s.apache.org/sling.wiki)
-[FAQ](http://s.apache.org/sling.faq)
-
-**API Docs**
-[Sling 9](/apidocs/sling9/index.html)
-[Sling 8](/apidocs/sling8/index.html)
-[Sling 7](/apidocs/sling7/index.html)
-[Sling 6](/apidocs/sling6/index.html)
-[Sling 5](/apidocs/sling5/index.html)
-[Archive at javadoc.io](/javadoc-io.html)
-
-**Project info**
-[Downloads](/downloads.cgi)
-[License](http://www.apache.org/licenses/)
-[Contributing](/contributing.html)
-[News](/news.html)
-[Links](/links.html)
-[Project Information](/project-information.html)
-[Issue Tracker](https://issues.apache.org/jira/browse/SLING)
-[Build Server](http://ci.apache.org/builders/sling-trunk)
-[Security](/project-information/security.html)
-
-**Source**
-[Subversion](http://svn.apache.org/viewvc/sling/trunk)
-[Git](git://git.apache.org/sling.git)
-[Github Mirror](https://github.com/apache/sling)
-
-**Sponsorship**
-[Thanks](http://www.apache.org/foundation/thanks.html)
-[Become a Sponsor](http://www.apache.org/foundation/sponsorship.html)
-[Buy Stuff](http://www.apache.org/foundation/buy_stuff.html)
-
-**[Site Map](/sitemap.html)**
-
-<!-- no valid ads for now, we'll reactivate this when needed
-<iframe
- src="http://www.apache.org/ads/button.html"
- style="border-width:0; float: left" frameborder="0"
- scrolling="no"
- width="135"
- height="135">
-</iframe>
--->
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/OLD-from-apache-cms/templates/single_narrative.html
----------------------------------------------------------------------
diff --git a/OLD-from-apache-cms/templates/single_narrative.html b/OLD-from-apache-cms/templates/single_narrative.html
deleted file mode 100644
index 42900c5..0000000
--- a/OLD-from-apache-cms/templates/single_narrative.html
+++ /dev/null
@@ -1,3 +0,0 @@
-{% extends "skeleton.html" %}
-{% block title %}{{ headers.title }}{% endblock %}
-{% block content %}{{ content|markdown }}{% endblock %}
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/OLD-from-apache-cms/templates/skeleton.html
----------------------------------------------------------------------
diff --git a/OLD-from-apache-cms/templates/skeleton.html b/OLD-from-apache-cms/templates/skeleton.html
deleted file mode 100644
index d77ce39..0000000
--- a/OLD-from-apache-cms/templates/skeleton.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE- 2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
- <title>Apache Sling - {% block title %}{% endblock %}</title>
- <link rel="icon" href="/res/favicon.ico">
- <link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
- <link rel="stylesheet" href="/res/codehilite.css" type="text/css" media="all">
- </head>
- <body>
- <div class="title">
- <div class="logo">
- <a href="//sling.apache.org/">
- <img border="0" alt="Apache Sling" src="/res/logo.svg">
- </a>
- </div>
- <div class="header">
- <a href="//www.apache.org/">
- <img border="0" alt="Apache" src="/res/apache.png">
- </a>
- </div>
- </div>
-
- <div class="menu">
- {% filter markdown %}{% include "sidenav.mdtext" %}{% endfilter %}
- </div>
-
- <div class="main">
- <div class="breadcrump" style="font-size: 80%;">
- {{ breadcrumbs|safe }}
- </div>
-
- {%if oldpage %}
- <div class="tip">
- This page is a translated version of <a href="{{ oldpage }}" target="sling_cwiki">{{ oldpage }}</a>. In case of
- doubt you might want to refer to the old page.
- </div>
- {% endif %}
-
- <h1>{% block title %}{% endblock %}</h1>
- {% block content %}{% endblock %}
- <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
- Rev. {{ svninfo.rev }} by {{ svninfo.author|safe }} on {{ svninfo.date|date:"D, j M Y H:i:s O" }}
- </div>
- <div class="trademarkFooter">
- Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
- logo are trademarks of The Apache Software Foundation. All other marks mentioned
- may be trademarks or registered trademarks of their respective owners.
- </div>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/OLD-from-apache-cms/update-obr.sh
----------------------------------------------------------------------
diff --git a/OLD-from-apache-cms/update-obr.sh b/OLD-from-apache-cms/update-obr.sh
deleted file mode 100755
index edef12a..0000000
--- a/OLD-from-apache-cms/update-obr.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-# Note: so far this is only tested on Mac OSX. Please remove this comment
-# if it works on Linux, or fix if it doesn't.
-
-if [ "$2" == "" ]; then
- echo "Usage: sh $0 <module> <version>"
- echo " e.g. sh $0 org.apache.sling.commons.threads 3.2.2"
- exit 1
-fi
-
-MODULE=$1
-VERSION=$2
-
-TMP_DIR=tmp-update-obr/$MODULE-$VERSION
-
-URL_PREFIX=https://repository.apache.org/content/groups/public/org/apache/sling/$MODULE/$VERSION
-JAR_NAME=$MODULE-$VERSION.jar
-POM_NAME=$MODULE-$VERSION.pom
-
-SITE_DIR=$(pwd)
-
-function download {
- FILE=$1
- curl -fO $URL_PREFIX/$FILE 2> /dev/null
- if [ "$?" != "0" ]; then
- echo Failed to download artifact $URL_PREFIX/$FILE
- echo Please verify that the desired artifact is available.
- exit 1;
- fi
-}
-
-mkdir -p $TMP_DIR
-
-(
- cd $TMP_DIR
-
- download $POM_NAME
- download $JAR_NAME
-
- mvn org.apache.felix:maven-bundle-plugin:deploy-file \
- -Dfile=$JAR_NAME -DpomFile=$POM_NAME \
- -DbundleUrl=http://repo1.maven.org/maven2/org/apache/sling/$MODULE/$VERSION/$JAR_NAME \
- -Durl=file:///$SITE_DIR/content/obr \
- -DprefixUrl=http://repo1.maven.org/maven2 \
- -DremoteOBR=sling.xml
-)
-
-rm -rf tmp-update-obr/
-echo OBR updated successfully. Please review the changes and commit.
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index 146d958..0000000
--- a/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# sling-jbake
-Experimenting with JBake for the Apache Sling website.
-
-See also https://issues.apache.org/jira/browse/SLING-6955
-
-
-## How to build the site locally
-* Clone this repository
-* Run `./bake.sh`
-* Open http://localhost:8820/ and enjoy.
-
-## TODO
-
-### "Looks easy" (famous last words)
-* Move images and other files to /assets and convert their links
-* Enumerate child pages in documentation/tutorials-how-tos.html -> replace with a manually generated list? or use tags to mark and select that content.
-* Fix references like `refs.authentication-tasks.headers.excerpt` as well as `.title` references -> replace with copies of those titles and excerpts, or use tags to mark and select
-* Fix remaining `refs.` links -> those are probably broken anyway
-* The `#!java` macro is not supported -> convert to monospaced code
-* Finish the dynamic downloads page, links are still TODO + test with CGI script
-* sitemap page is missing
-
-### Nice to have
-* JBake 2.5.x does not support the `[TOC]` macro but apparently that will be available once JBake moves to https://github.com/vsch/flexmark-java , probably in its next version. We might wait for that and just mark the TOCs as unsupported for now.
-* Left menu is not yellow as on the old site (we might refresh the overall style anyway)
-
-### Final validation, activation etc.
-* Review all pages
-* Resync the content with the current Sling website if needed, initially synced at r1798604
-* Move the Git repository to apache.org, create an `asf-site` branch for the live content and ask infra to setup gitpubsub to activate it
-
-### Done
-* Fix internal links like `refs.project-information.path`
-* Page header and footer, logo etc
-* Remove unused assets files and templates (copied from JBake Groovy sample)
-* Tables work now, needed the pegdown TABLES extension
-
-## JBake notes
-* Currently using 2.5.1, see under `/bin`, docs at http://jbake.org/docs/2.5.1
-* Uses https://github.com/sirthias/pegdown for Markdown, syntax info at https://github.com/sirthias/pegdown/blob/master/src/test/resources/MarkdownTest103/Markdown%20Documentation%20-%20Syntax.md , extensions at http://www.decodified.com/pegdown/api/org/pegdown/Extensions.html
-* Groovy MarkupTemplateEngine examples at https://github.com/jbake-org/jbake-example-project-groovy-mt , docs for that engine at http://groovy-lang.org/templating.html#_simpletemplateengine
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/UNUSED-from-tamaya-example/bake-jenkins.sh
----------------------------------------------------------------------
diff --git a/UNUSED-from-tamaya-example/bake-jenkins.sh b/UNUSED-from-tamaya-example/bake-jenkins.sh
deleted file mode 100755
index 3d3283b..0000000
--- a/UNUSED-from-tamaya-example/bake-jenkins.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash -x
-echo "Starting to bake our project homepage ...."
-export JBAKE_HOME="$(dirname "$0")/bin/jbake-2.5.1"
-echo $JBAKE_HOME
-$JBAKE_HOME/bin/jbake -b --reset
-echo "DONE"
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/UNUSED-from-tamaya-example/copysite.sh
----------------------------------------------------------------------
diff --git a/UNUSED-from-tamaya-example/copysite.sh b/UNUSED-from-tamaya-example/copysite.sh
deleted file mode 100755
index 19c9008..0000000
--- a/UNUSED-from-tamaya-example/copysite.sh
+++ /dev/null
@@ -1,7 +0,0 @@
- #!/bin/bash
-echo "Starting to bake our project homepage ...."
-export JBAKE_HOME="$(dirname "$0")/bin/jbake-2.5.1"
-echo $JBAKE_HOME
-$JBAKE_HOME/bin/jbake -b
-echo "Copying stuff from original into new branch ..."
-git checkout asf-site && ./copy-site.sh
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/WEBSITE-HOWTO.txt
----------------------------------------------------------------------
diff --git a/WEBSITE-HOWTO.txt b/WEBSITE-HOWTO.txt
deleted file mode 100644
index b592fe9..0000000
--- a/WEBSITE-HOWTO.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-How to update the Sling website
--------------------------------
-TODO describe how to use the JBake/gitpubsub setup.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/assets/res/css/codehilite.css
----------------------------------------------------------------------
diff --git a/assets/res/css/codehilite.css b/assets/res/css/codehilite.css
deleted file mode 100644
index 93ce023..0000000
--- a/assets/res/css/codehilite.css
+++ /dev/null
@@ -1,429 +0,0 @@
-/*************************************************************************
-
- For reference: classes defined by the Confluence batch.css
-
-.code {
- border-width: 1px;
- border-style: dashed;
- overflow: auto;
-}
-
-.code,.preformatted {
- background-color: #fff;
-}
-
-.code pre,.preformatted pre {
- font-family: "Courier New", Courier, monospace;
- line-height: 1.3;
-}
-
-.code-keyword {
- color: #000091;
- background-color: inherit;
-}
-
-.code-object {
- color: #910091;
- background-color: inherit;
-}
-
-.code-quote {
- color: #009100;
- background-color: inherit;
-}
-
-.code-comment {
- color: #808080;
- background-color: inherit;
-}
-
-.code-xml .code-keyword {
- color: inherit;
- font-weight: bold;
-}
-
-.code-tag {
- color: #000091;
- background-color: inherit;
-}
-
-*/
-
-/*************************************************************************
-
- For reference: classes defined by the old Sling Site CSS
-
-.codehilite {
- color: black;
- background-color: #f0f0f0;
- border: solid 1px black;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- padding: 0.5em
-}
-
-.codeHeader {
- text-align: center;
- font-family: monospace;
- border-bottom: 1px solid black;
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- margin-bottom: 0.5em;
-}
-
-
-.codehilite pre {
- margin: 0em
-}
-
-.code-keyword {
- color: #880000
-}
-
-.code-quote {
- color: #008800
-}
-
-.code-object {
- color: #0000dd
-}
-
-.code-java {
- margin: 0em
-}
-
-*/
-
-/**
- Apache CMS Code High Lighting
-
- HTML structure for default (:::, un-numbered code)
-
- <div class="codehilite">
- <pre>
- ... span-tagged code ...
- </pre>
- </div>
-
-
- HTML structure for #! (line numbered code)
-
- <table class="codehilitetable">
- <tr>
- <td class="linenos">
- <div class="linenodiv">
- <pre>
- ... line numbers ...
- </pre>
- </div>
- </td>
- <td class="code">
- <div class="codehilite">
- <pre>
- ... span-tagged code ...
- </pre>
- </div>
- </td>
- </tr>
- </table>
-*/
-
-.codehilitetable, .codehilite {
- color: black;
- background-color: #f4f4f4;
- border: solid 1px #DDD;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- padding: 0.5em;
-}
-
-.codehilitetable .linenos {
- border: none;
-}
-
-.codehilitetable .linenos .linenodiv {
-}
-
-.codehilitetable .linenos .linenodiv pre {
- margin: 0px;
- padding: 0px;
-}
-
-.codehilitetable .code {
- border: none;
-}
-
-.codehilitetable .code .codehilite {
- /** overwrite from .codehilite class above */
- border: none;
- margin: 0px;
- padding: 0px;
-}
-
-.codehilite pre {
- /* Applies to both .codehilite divs, top level and in table */
- margin: 0px;
- padding: 0px;
- overflow: auto;
-}
-
-
-/**
- * Pygments Code Formatter Styles
- */
-
-/** Whitespace */
-.codehilite .w {
-}
-/** Error */
-.codehilite .err {
-}
-/** Other */
-.codehilite .x {
-}
-
-/** Keyword */
-.codehilite .k {
- color: #880000
-}
-/** Keyword.Constant */
-.codehilite .kc {
- color: #880000
-}
-/** Keyword.Declaration */
-.codehilite .kd {
- color: #880000
-}
-/** Keyword.Namespace */
-.codehilite .kn {
- color: #880000
-}
-/** Keyword.Pseudo */
-.codehilite .kp {
- color: #880000
-}
-/** Keyword.Reserved */
-.codehilite .kr {
- color: #880000
-}
-/** Keyword.Type */
-.codehilite .kt {
- color: #880000
-}
-
-/** Name */
-.codehilite .n {
- color: #0000dd
-}
-/** Name.Attribute */
-.codehilite .na {
- color: #0000dd
-}
-/** Name.Builtin */
-.codehilite .nb {
- color: #0000dd
-}
-/** Name.Builtin.Pseudo */
-.codehilite .bp {
- color: #0000dd
-}
-/** Name.Class */
-.codehilite .nc {
- color: #0000dd
-}
-/** Name.Constant */
-.codehilite .no {
- color: #0000dd
-}
-/** Name.Decorator */
-.codehilite .nd {
- color: #0000dd
-}
-/** Name.Entity */
-.codehilite .ni {
- color: #0000dd
-}
-/** Name.Exception */
-.codehilite .ne {
- color: #0000dd
-}
-/** Name.Function */
-.codehilite .nf {
- color: #0000dd
-}
-/** Name.Property */
-.codehilite .py {
- color: #0000dd
-}
-/** Name.Label */
-.codehilite .nl {
- color: #0000dd
-}
-/** Name.Namespace */
-.codehilite .nn {
- color: #0000dd
-}
-/** Name.Other */
-.codehilite .nx {
- color: #0000dd
-}
-/** Name.Tag */
-.codehilite .nt {
- color: #0000dd
-}
-/** Name.Variable */
-.codehilite .nv {
- color: #0000dd
-}
-/** Name.Variable.Class */
-.codehilite .vc {
- color: #0000dd
-}
-/** Name.Variable.Global */
-.codehilite .vg {
- color: #0000dd
-}
-/** Name.Variable.Instance */
-.codehilite .vi {
- color: #0000dd
-}
-
-/** Literal */
-.codehilite .l {
-}
-/** Literal.Date */
-.codehilite .ld {
-}
-
-/** String */
-.codehilite .s {
- color: #008800
-}
-/** String.Backtick */
-.codehilite .sb {
- color: #008800
-}
-/** String.Char */
-.codehilite .sc {
- color: #008800
-}
-/** String.Doc */
-.codehilite .sd {
- color: #008800
-}
-/** String.Double */
-.codehilite .s2 {
- color: #008800
-}
-/** String.Escape */
-.codehilite .se {
- color: #008800
-}
-/** String.Heredoc */
-.codehilite .sh {
- color: #008800
-}
-/** String.Interpol */
-.codehilite .si {
- color: #008800
-}
-/** String.Other */
-.codehilite .sx {
- color: #008800
-}
-/** String.Regex */
-.codehilite .sr {
- color: #008800
-}
-/** String.Single */
-.codehilite .s1 {
- color: #008800
-}
-/** String.Symbol */
-.codehilite .ss {
- color: #008800
-}
-
-/** Number */
-.codehilite .m {
-}
-/** Number.Float */
-.codehilite .mf {
-}
-/** Number.Hex */
-.codehilite .mh {
-}
-/** Number.Integer */
-.codehilite .mi {
-}
-/** Number.Integer.Long */
-.codehilite .il {
-}
-/** Number.Oct */
-.codehilite .mo {
-}
-/** Operator */
-.codehilite .o {
-}
-/** Operator.Word */
-.codehilite .ow {
-}
-/** Punctuation */
-.codehilite .p {
-}
-
-/** Comment */
-.codehilite .c {
- color: #808080;
-}
-/** Comment.Multiline */
-.codehilite .cm {
- color: #808080;
-}
-/** Comment.Preproc */
-.codehilite .cp {
- color: #808080;
-}
-/** Comment.Single */
-.codehilite .c1 {
- color: #808080;
-}
-/** Comment.Special */
-.codehilite .cs {
- color: #808080;
-}
-
-/** Generic */
-.codehilite .g {
-}
-/** Generic.Deleted */
-.codehilite .gd {
-}
-/** Generic.Emph */
-.codehilite .ge {
-}
-/** Generic.Error */
-.codehilite .gr {
-}
-/** Generic.Heading */
-.codehilite .gh {
-}
-/** Generic.Inserted */
-.codehilite .gi {
-}
-/** Generic.Output */
-.codehilite .go {
-}
-/** Generic.Prompt */
-.codehilite .gp {
-}
-/** Generic.Strong */
-.codehilite .gs {
-}
-/** Generic.Subheading */
-.codehilite .gu {
-}
-/** Generic.Traceback */
-.codehilite .gt {
-}
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/assets/res/css/site.css
----------------------------------------------------------------------
diff --git a/assets/res/css/site.css b/assets/res/css/site.css
deleted file mode 100644
index a626a5a..0000000
--- a/assets/res/css/site.css
+++ /dev/null
@@ -1,263 +0,0 @@
-body {
- background-color: #ffffff;
- color: #3b3b3b;
- font-family: Tahoma, Arial, sans-serif;
- font-size: 10pt;
- line-height: 140%
-}
-
-h1,h2,h3,h4,h5,h6 {
- font-weight: normal;
- color: #000000;
- line-height: 100%;
-}
-
-h1 {
- font-size: 200%;
- font-weight: bold;
- border-bottom: solid #EEE 1px;
- border-top: solid #EEE 1px;
- padding-top:.2em;
- padding-bottom:.2em;
-}
-
-h2 {
- font-size: 200%;
- margin-top: 1em;
- font-weight: normal;
- border-top: solid rgb(155, 155, 155) 2px;
- padding-top: 0.45em;
-}
-
-h3 {
- font-size: 150%
-}
-
-h4 {
- font-size: 140%
-}
-
-h5 {
- font-size: 130%
-}
-
-h6 {
- font-size: 120%
-}
-
-a {
- color: #1980af
-}
-
-a:visited {
- color: #1980af
-}
-
-a:hover {
- color: #1faae9
-}
-
-img {
- max-width: 100%;
- border: solid 1px #EEE;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- padding: 0.5em
-}
-
-.title {
- position: absolute;
- left: 1px;
- right: 1px;
- top: 25px;
- height: 81px;
- background:
- url(https://sling.apache.org/site/media.data/gradient.png)
- repeat-x;
- background-position: bottom;
-}
-
-.title img {
- width: auto;
- border: none;
- margin-top: 0px;
- margin-bottom: 0px;
- padding: 0px;
-}
-
-.logo {
- position: absolute;
- width: 15em;
- height: 81px;
- text-align: center;
-}
-
-.logo img {
- height: 63px;
-}
-
-.header {
- text-align: right;
- margin-right: 20pt;
-}
-
-.menu {
- border-top: 10px solid #f9bb00;
- position: absolute;
- top: 107px;
- left: 1px;
- width: 15em;
- bottom: 0px;
- padding: 0px;
- background-color: #fcfcfc
-}
-
-.menu ul,.menu p {
- background-color: #fdf5d9;
- list-style: none;
- padding-left: 4em;
- margin-top: 0px;
- padding-top: 2em;
- padding-bottom: 2em;
- margin-left: 0px;
- color: #4a4a43
-}
-
-.menu p {
- font-size: 90%;
- margin: 0px;
- padding: 1px;
- padding-left: 1em;
- padding-bottom: 1em;
-}
-
-.menu a {
- text-decoration: none;
- color: #4a4a43
-}
-
-.main {
- position: absolute;
- border-top: 10px solid #cde0ea;
- top: 107px;
- left: 15em;
- right: 1px;
- margin-left: 2px;
- padding-right: 4em;
- padding-left: 1em;
- padding-top: 1em;
-}
-
-.preformatted {
- color: black;
- background-color: #eeeeee;
- border: solid 1px black;
- padding: 0.5em
-}
-
-.preformattedContent pre {
- margin: 0em
-}
-
-table {
- border-collapse: collapse;
- margin: 5px;
-}
-
-th {
- background-color: #FDF5D9;
- border: 1px solid #DDD;
- padding: 3px 4px;
- text-align: left;
- font-weight:bold;
- font-size:90%;
- padding: 3px 4px;
-}
-
-td {
- border: 1px solid #DDD;
- padding: 3px 4px;
-}
-
-.note
-{
-/*
- background-color: #FFFFCE;
- border: 1px solid #F0C000;
-*/
- border: 1px solid #f0c000;
- background: #ffffce url('icons/warning.gif') no-repeat 5px 5px;
- text-align: left;
- margin-top: 5px;
- margin-bottom: 5px;
- padding: 5px 5px 5px 28px;
-}
-
-.warning
-{
-/*
- background-color: #FFCCCC;
- border: 1px solid #CC0000;
-*/
- border: 1px solid #f0c000;
- background: #ffffce url('icons/forbidden.gif') no-repeat 5px 5px;
- text-align: left;
- margin-top: 5px;
- margin-bottom: 5px;
- padding: 5px 5px 5px 28px;
-}
-
-.info
-{
-/*
- background-color: #D8E4F1;
- border: 1px solid #3C78B5;
-*/
- border: 1px solid #3c78b5;
- background: #D8E4F1 url('icons/information.gif') no-repeat 5px 5px;
- text-align: left;
- margin-top: 5px;
- margin-bottom: 5px;
- padding: 5px 5px 5px 28px;
-}
-
-.tip
-{
-/*
- background-color: #DDFFDD;
- border: 1px solid #009900;
-*/
- border: 1px solid #090;
- background: #dfd url('/res/icons/check.gif') no-repeat 5px 5px;
- text-align: left;
- margin-top: 5px;
- margin-bottom: 5px;
- padding: 5px 5px 5px 28px;
-}
-
-/** Breadcrump at the top of each page */
-.breadcrump {
- font-size: 80%;
-}
-
-/** Last modification information at the botton of each page */
-.timestamp {
- margin-top: 30px;
- font-size: 80%;
- text-align: right;
-}
-
-/** Trademark text at the bottom of each page */
-.trademarkFooter {
- font-size: 80%;
- font-style: italic;
- margin-top: 10px;
- text-align: left;
-}
-
-blockquote {
- font-style: italic;
- margin: 0;
- padding-left: 1em;
- border-left: 1px solid black;
-}
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/assets/res/logos/apache.png
----------------------------------------------------------------------
diff --git a/assets/res/logos/apache.png b/assets/res/logos/apache.png
deleted file mode 100644
index fc3f667..0000000
Binary files a/assets/res/logos/apache.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/assets/res/logos/sling.png
----------------------------------------------------------------------
diff --git a/assets/res/logos/sling.png b/assets/res/logos/sling.png
deleted file mode 100644
index 69163d9..0000000
Binary files a/assets/res/logos/sling.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/assets/res/logos/sling.svg
----------------------------------------------------------------------
diff --git a/assets/res/logos/sling.svg b/assets/res/logos/sling.svg
deleted file mode 100644
index ac3c0e7..0000000
--- a/assets/res/logos/sling.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<svg id="Sling_Logo" data-name="Sling Logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 768 392"><defs><linearGradient id="linear-gradient" x1="-8576.57" y1="2068.26" x2="-8523.42" y2="2006.11" gradientTransform="matrix(-1, -0.01, -0.01, 1, -8384.13, -1821.1)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f69923"/><stop offset="0.31" stop-color="#f79a23"/><stop offset="0.84" stop-color="#e97826"/></linearGradient><linearGradient id="linear-gradient-2" x1="-8969.97" y1="2075.12" x2="-8590.74" y2="2075.12" gradientTransform="matrix(-1, -0.01, -0.01, 1, -8384.13, -1821.1)" gradientUnits="userSpaceOnUse"><stop offset="0.32" stop-color="#9e2064"/><stop offset="0.63" stop-color="#c92037"/><stop offset="0.75" stop-color="#cd2335"/><stop offset="1" stop-color="#e97826"/></linearGradient><linearGradient id="linear-gradient-3" x1="-8924.2" y1="2037.09" x2="-8698.21" y2="2037.09" gradientTransform="matrix(-1, -0.01, -0.01, 1, -8384.
13, -1821.1)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#282662"/><stop offset="0.1" stop-color="#662e8d"/><stop offset="0.79" stop-color="#9f2064"/><stop offset="0.95" stop-color="#cd2032"/></linearGradient><linearGradient id="linear-gradient-4" x1="-8948.67" y1="2078.65" x2="-8569.44" y2="2078.65" xlink:href="#linear-gradient-2"/><linearGradient id="linear-gradient-5" x1="-8921.02" y1="2073.54" x2="-8721.72" y2="2073.54" xlink:href="#linear-gradient-3"/><linearGradient id="linear-gradient-6" x1="-8948.67" y1="2039.41" x2="-8569.45" y2="2039.41" xlink:href="#linear-gradient-2"/><linearGradient id="linear-gradient-7" x1="-8972.2" y1="2041.35" x2="-8592.97" y2="2041.35" xlink:href="#linear-gradient-2"/><linearGradient id="linear-gradient-8" x1="-8948.67" y1="2027.74" x2="-8569.45" y2="2027.74" xlink:href="#linear-gradient-2"/><linearGradient id="linear-gradient-9" x1="-8948.67" y1="2029.08" x2="-8569.45" y2="2029.08" xlink:href="#linear-gradient-2"/><linearGradient
id="linear-gradient-10" x1="-8735.63" y1="2029.35" x2="-8692.34" y2="2029.35" xlink:href="#linear-gradient-2"/></defs><title>Logo - Close Crop</title><path d="M223.41,235.88V63l-36.64-.32V251.7q0,33.89,24.93,33.89c13.7,0,18.88-5.26,24.53-15.93C224.68,266.15,223.41,254.84,223.41,235.88Z" style="fill:#00678c"/><polygon points="260.96 158.86 275.98 158.86 275.98 283.36 311.94 283.36 311.94 129.39 260.96 129.39 260.96 158.86" style="fill:#00678c"/><path d="M294.3,69.73a19.91,19.91,0,0,0-14.58,6.09,21,21,0,0,0,0,29.47,20.43,20.43,0,0,0,28.89.26l.26-.26a21,21,0,0,0,0-29.47A19.91,19.91,0,0,0,294.3,69.73Z" style="fill:#00678c"/><path d="M431.14,125.93q-28.59,0-43.25,17V128.75H355.27V281.09h35.84V171a39,39,0,0,1,14.14-11,38.47,38.47,0,0,1,16.89-4.42q17.08,0,24.65,9T454.31,193v88h35.84V187.66q0-29.15-15.93-45.44T431.14,125.93Z" style="fill:#00678c"/><path d="M154.85,385l-2.77-.73-.18,0-1.25-.34c-21.81-5.87-37-11.75-45.1-17.46a33.85,33.85,0,0,1-7-6.59h-67V311.43A170.49,170.49,0,0,1,.15,298.89V
392H185.77c-4.64-.92-9.31-1.89-14-2.92C165.58,387.68,160,386.35,154.85,385Z" style="fill:#00678c"/><path d="M129.72,354.16c5.61,4,18.63,8.84,36.46,13.64l14.09-18.15a264,264,0,0,1-35.69-9.1l-1.26-.43,1.26.43c3.54,1.14,14.73,4.43,35.49,7.65-5-9.83-14.05-24.37-21.89-36-22.71,5.71-29,17.47-29,17.47S118.18,346,129.72,354.16Z" style="fill:url(#linear-gradient)"/><path d="M242.78,323.18a1.49,1.49,0,0,0-.14-.19l.79,1.34.23.19C243.37,324.08,243.08,323.62,242.78,323.18Z" style="fill:none"/><path d="M280.45,318.26c.54.73,1,1.48,1.55,2.25C281.5,319.74,281,319,280.45,318.26Z" style="fill:none"/><path d="M385.47,352.77l-1,.06q-10,.61-19.52,1.08-10.69.52-20.78.89-10.65.38-20.62.59-10.49.22-20.27.28-8,0-15.48,0l-5-.05c-3.26,0-6.44-.09-9.57-.15-2.89-.06-5.71-.13-8.5-.21l-2.76-.09h-.44l.67,1.14-1.46,1.81.67,0q6.29.28,12.66.45l7.38.18q10.24.22,20.58.24t20.86-.13q10.24-.15,20.39-.45c6.76-.2,13.48-.43,20.12-.71,6.94-.29,13.82-.63,20.57-1l4.57-.25q8.19-.47,16.13-1l2.31-2.85-.76-1.28-.48,0Q395.4,352.16,38
5.47,352.77Z" style="fill:none"/><path d="M282.36,321.09h0l0,0Z" style="fill:none"/><path d="M300,317.05c.78,1.15,1.6,2.34,2.42,3.56l0,0c-.39-.62-.8-1.24-1.2-1.83S300.42,317.63,300,317.05Z" style="fill:#be202e"/><path d="M300,317.05c.78,1.15,1.6,2.34,2.42,3.56l0,0c-.39-.62-.8-1.24-1.2-1.83S300.42,317.63,300,317.05Z" style="fill:#be202e;opacity:0.349999994039536;isolation:isolate"/><path d="M282.34,321.07h0l0,0c-.12-.2-.24-.38-.37-.58-.49-.78-1-1.54-1.55-2.25l1.9,2.81Z" style="fill:#be202e"/><path d="M282.34,321.07h0l0,0c-.12-.2-.24-.38-.37-.58-.49-.78-1-1.54-1.55-2.25l1.9,2.81Z" style="fill:#be202e;opacity:0.349999994039536;isolation:isolate"/><path d="M241.13,357c-6.91-.48-13.72-1-20.39-1.7q-10.4-1-20.33-2.4l-1.17-.16c-6.5-.91-12.83-1.95-18.95-3.11L166.2,367.79l3.76,1c4.8,1.25,9.91,2.47,15.29,3.67,6.07,1.35,12.47,2.67,19.15,3.92,6.16,1.16,12.57,2.26,19.16,3.29q8.4,1.33,17.17,2.46l.65.08,19.46-24.12Q250.85,357.66,241.13,357Z" style="fill:url(#linear-gradient-2)"/><path d="M409.33,35
1.14q8.1-.6,16.48-1.31l.24,0,2.38-.2c3.77-.32,7.15-.64,14.85-1.36,0-4.53,3.17-9.58,7-14.74a22.55,22.55,0,0,0-11.14,13c-7.51-18.92-19.4-32.77-36.66-34.91a40.68,40.68,0,0,0-4.74-.31c6.45,1.61,10.56,5.34,14,14.33l0,0,0,0c-11.58-10.3-20-14.26-31.79-15.85-2.79-.37-5.76-.62-9-.78,16.66,6,25.83,17.64,29.54,32.52l5.78,9.81Z" style="fill:url(#linear-gradient-3)"/><path d="M384,356.74q-10.15.55-20.57,1-10,.41-20.12.71t-20.39.45q-10.41.15-20.86.13t-20.58-.24l-7.38-.18q-6.36-.19-12.66-.45l-.67,0-19.46,24.12,1.31.17c6.19.79,12.49,1.51,18.87,2.13s13,1.16,19.53,1.58q8.31.55,16.65.86l3.36.1q10.46.29,20,.1c7.19-.14,14-.47,20.31-.94q6.27-.47,12-1.1c3.25-.38,6.47-.83,9.68-1.29q11.31-1.66,22.19-4.11l19.53-24.22q-7.93.52-16.13,1C387.12,356.58,385.58,356.65,384,356.74Z" style="fill:url(#linear-gradient-4)"/><path d="M386.18,379.5a214.44,214.44,0,0,0,25.68-7.57l.87-.31c-4.61,6.89-6,20.43-6,20.38,7.66-12.68,16.08-23.48,26.53-29.23,2.69,3.73,4,9.91,4.55,17.48,3.17-9.58,2.6-15.45,2.17-17.64,3.19,6.05,10.39,1
0.61,18.27,14.93-8.2-7.81-13.23-14.82-14.46-20.92,28.78-2.42,60.13-6,93.19-10.28a8.39,8.39,0,0,0-7.4-2.92c-6,.81-45.23,6-98,10.16l-4.53.36-1.27.1c-5.54.42-11.21.83-17,1.22l-4,.26h-.08L385.2,379.73C385.53,379.64,385.86,379.58,386.18,379.5Z" style="fill:url(#linear-gradient-5)"/><path d="M262,355.16l2.76.09q4.16.12,8.5.21c3.13.06,6.31.12,9.57.15l5,.05q7.52.06,15.48,0,9.78-.05,20.27-.28,10-.21,20.62-.59,10.09-.36,20.78-.89,9.53-.47,19.52-1.08l1-.06q9.93-.6,20.34-1.37l.48,0-5.78-9.81c.06.23.13.43.17.67-7.1-11.64-23.7-23.9-39.86-29.37a107.71,107.71,0,0,0-24.72-5,176.41,176.41,0,0,0-21.88-.54c-6.86.22-14.14.75-21.92,1.6a40.76,40.76,0,0,1,7.7,8.16c.41.57.83,1.16,1.23,1.74s.81,1.21,1.2,1.83h0l0,0c-9.61-9.52-21.42-12.92-34.27-13.47a44.67,44.67,0,0,1,12.3,11.11c.54.73,1,1.48,1.55,2.25.13.19.25.38.37.58h0l0,0h0a51.59,51.59,0,0,0-10.38-7.7c-.76-.41-1.51-.81-2.29-1.16-1.17-.55-2.37-1-3.59-1.46-.78-.27-1.57-.53-2.37-.74a43.86,43.86,0,0,0-5.88-1.22l-1.9-.24-2.67-.13c-4-.15-7.41-.14-10.41,0-1.49.05
-2.87.14-4.13.25-.5,0-1,.08-1.45.14-1.4.14-2.63.3-3.69.46a36.5,36.5,0,0,0-3.71.76h0a12.78,12.78,0,0,1,1.51.93c3.64,2.54,8.22,7.65,11.27,12.05l-5.31-9,5.31,9a1.49,1.49,0,0,0,.14.19l.88,1.34-.23-.19,18.16,30.82A2,2,0,0,0,262,355.16Z" style="fill:url(#linear-gradient-6)"/><path d="M180.07,348.2c5.72.89,12.16,1.77,19.38,2.6l1.14.13Q210,352,221,352.9c6.39.52,13.2,1,20.47,1.38q9.51.51,20.07.86l-18.16-30.82c-8.59-7.49-14.43-9.94-22-11.47-2.05-.38-4.19-.74-6.37-1.06-6.7-1-13.9-1.68-20.89-2a186.88,186.88,0,0,0-19.1-.07,87.87,87.87,0,0,0-9.87,1c-2.52.42-4.86.93-7.06,1.48C166,323.83,175,338.37,180.07,348.2Z" style="fill:url(#linear-gradient-7)"/><path d="M301.23,318.8c.41.6.81,1.21,1.2,1.83h0C302,320,301.64,319.4,301.23,318.8Z" style="fill:#be202e"/><path d="M301.23,318.8c.41.6.81,1.21,1.2,1.83h0C302,320,301.64,319.4,301.23,318.8Z" style="fill:#be202e;opacity:0.349999994039536;isolation:isolate"/><path d="M301.23,318.8c.41.6.81,1.21,1.2,1.83h0C302,320,301.64,319.4,301.23,318.8Z" style="fill:ur
l(#linear-gradient-8)"/><path d="M282.36,321.09c-.12-.2-.24-.38-.37-.58.13.19.25.38.37.58Z" style="fill:#be202e"/><path d="M282.36,321.09c-.12-.2-.24-.38-.37-.58.13.19.25.38.37.58Z" style="fill:#be202e;opacity:0.349999994039536;isolation:isolate"/><path d="M282.36,321.09c-.12-.2-.24-.38-.37-.58.13.19.25.38.37.58Z" style="fill:url(#linear-gradient-9)"/><path d="M282.35,321.08Z" style="fill:#be202e"/><path d="M282.35,321.08Z" style="fill:#be202e;opacity:0.349999994039536;isolation:isolate"/><path d="M282.35,321.08Z" style="fill:url(#linear-gradient-10)"/><path d="M600.39,249.82a39.59,39.59,0,0,0,31.86-13.62c7.49-9,11.47-25.25,11.47-39.83a45,45,0,0,0-12.39-31.86,40.7,40.7,0,0,0-30.94-13.18,43,43,0,0,0-32.74,13.18,44.64,44.64,0,0,0-12.39,32c0,14.06,4.22,30.19,12.19,39.43A41.62,41.62,0,0,0,600.39,249.82Z" style="fill:none"/><rect width="768" height="392" style="fill:none"/><path d="M623.13,292.79c-5.77.68-11.51,1.59-17.24,2.47-12.74,2-25.45,4.54-38.23,6.25-4,.52-9.24,1.08-11.95-2.59-3.78
-5.54,5.93-11.71,9.28-14.18,4-2.95,12.31-6.61,12.82-7.13a67.43,67.43,0,0,1,7.33.52,95.86,95.86,0,0,0,52.41-8.32,79.66,79.66,0,0,0,18-11.95A61.61,61.61,0,0,0,668.77,241a92.09,92.09,0,0,0,7.37-23.58,112.68,112.68,0,0,0,1.63-25.85,75.07,75.07,0,0,0-4.5-21.86,130.22,130.22,0,0,0-9.16-17.44l19.47-19.63V0H76.93Q43.72.68,22.29,20.47A67.42,67.42,0,0,0,.15,72.24,81.36,81.36,0,0,0,11.5,116.05q11.35,18.24,39.83,31.54l22.74,10.63q30.39,14.26,37.91,26.32a48.39,48.39,0,0,1,7.53,26.13,39.83,39.83,0,0,1-13.58,31,51.77,51.77,0,0,1-35.84,12.15,92.75,92.75,0,0,1-28.55-5.22A95.3,95.3,0,0,1,15,235.41L1,270.37a112.55,112.55,0,0,0,63.72,17.48q42.41,0,67.7-21.86a67.7,67.7,0,0,0,25.09-53.21q0-28.87-11.55-47.79t-40.22-32.18l-23.1-10.63a166.78,166.78,0,0,1-29.31-16.53A40.46,40.46,0,0,1,42.16,91a45.8,45.8,0,0,1-4-19.39A38,38,0,0,1,49.37,43.33a34.77,34.77,0,0,1,27.4-11.95H652.17v88.33l-11.71,11.95a28.32,28.32,0,0,0-5.5-2.87A96.14,96.14,0,0,0,602.15,122a93.39,93.39,0,0,0-33.29,4.38A77,77,0,0,0,542,144.21a80.93,8
0.93,0,0,0-15,21.7,87.14,87.14,0,0,0-6.85,26,85.11,85.11,0,0,0,1,26.68,75.39,75.39,0,0,0,8.64,22.9,78.86,78.86,0,0,0,14.34,16.29,99.57,99.57,0,0,0,10.31,8.72c-4,2.51-7.73,5.3-11.43,8-9.8,7.41-19.08,19.55-14.34,33.29s20.15,17.68,33.05,18.76a134.77,134.77,0,0,0,35.13-2.71c8.72-1.59,17.6-2.31,26.44-3.15,3.66-.36,7.25-1,11-1.08A21.11,21.11,0,0,1,651.33,326a13.32,13.32,0,0,1,1.13,2l0,.1c7.5,18.4-22.1,26.47-44.63,29.16-12.64,1.51-41,3.55-60.63,2.13-.68,13.23-6.45,24.89-15.74,32.55,15.74,0,38.51-.12,51.52-.91,11.1-.67,21.88-1,33.42-2.69,40-5.13,71.64-26.27,71.64-51C688,308.74,663.92,287.06,623.13,292.79ZM567.66,164.52a43,43,0,0,1,32.74-13.18,40.7,40.7,0,0,1,30.94,13.18,45,45,0,0,1,12.39,31.86c0,14.58-4,30.82-11.47,39.83a39.59,39.59,0,0,1-31.86,13.62A41.62,41.62,0,0,1,567.46,236c-8-9.24-12.19-25.37-12.19-39.43A44.64,44.64,0,0,1,567.66,164.52Z" style="fill:#00678c"/><path d="M728.16,3.74H716.93V34h-4V3.74H701.66V0h26.5Z" style="fill:#6d6e71"/><path d="M732.91,0h6l11.52,26.64h.1L762.14,0H768V
34h-4V5.47h-.1L751.68,34h-2.45L737,5.47h-.09V34h-4Z" style="fill:#6d6e71"/></svg>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bake.sh
----------------------------------------------------------------------
diff --git a/bake.sh b/bake.sh
deleted file mode 100755
index 7a1bc23..0000000
--- a/bake.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-clear
-echo "Cleaning up caches ..."
-rm -rf cache/ output/
-echo "Starting to bake our project homepage ...."
-export JBAKE_HOME="$(dirname "$0")/bin/jbake-2.5.1"
-echo $JBAKE_HOME
-$JBAKE_HOME/bin/jbake -b -s
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/README.md
----------------------------------------------------------------------
diff --git a/bin/README.md b/bin/README.md
deleted file mode 100644
index 3a3b70c..0000000
--- a/bin/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Attention
-
-Since the commits of a full jbake binary are very large you should split the contents of the lib-subfolder into multiple commits.
-
-Before that call:
-```
-$ git config --global http.postBuffer 524288000
-```
-
-In case of errors you may get the following behaviour, push takes a couple of minutes and fails:
-```
-$ git push
-Zähle Objekte: 33, Fertig.
-Delta compression using up to 4 threads.
-Komprimiere Objekte: 100% (32/32), Fertig.
-Schreibe Objekte: 100% (33/33), 8.05 MiB | 0 bytes/s, Fertig.
-Total 33 (delta 10), reused 0 (delta 0)
-error: RPC failed; HTTP 408 curl 22 The requested URL returned error: 408 Request Timeout
-fatal: The remote end hung up unexpectedly
-fatal: The remote end hung up unexpectedly
-Everything up-to-date
-```
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/LICENSE
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/LICENSE b/bin/jbake-2.5.1/LICENSE
deleted file mode 100644
index 0245a07..0000000
--- a/bin/jbake-2.5.1/LICENSE
+++ /dev/null
@@ -1,17 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Jonathan Bullock & Contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
-to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/bin/jbake
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/bin/jbake b/bin/jbake-2.5.1/bin/jbake
deleted file mode 100755
index c1180fc..0000000
--- a/bin/jbake-2.5.1/bin/jbake
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-P=$(realpath $0 2>/dev/null)
-if [ 0 -ne $? ]; then
- P=$0
-fi
-
-EXEC_LOC="`dirname "$P"`"
-EXEC_PARENT="`dirname $EXEC_LOC`"
-
-CYGWIN=false;
-case "`uname`" in
- CYGWIN*) CYGWIN=true;;
-esac
-
-if $CYGWIN ;
-then
- java -jar $(cygpath -w "${EXEC_PARENT}/jbake-core.jar") $@
-else
- java -jar "${EXEC_PARENT}/jbake-core.jar" $@
-fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/bin/jbake.bat
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/bin/jbake.bat b/bin/jbake-2.5.1/bin/jbake.bat
deleted file mode 100644
index dccbf14..0000000
--- a/bin/jbake-2.5.1/bin/jbake.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-java -jar "%~dp0\..\jbake-core.jar" %*
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/jbake-core.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/jbake-core.jar b/bin/jbake-2.5.1/jbake-core.jar
deleted file mode 100644
index 984b383..0000000
Binary files a/bin/jbake-2.5.1/jbake-core.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/args4j-2.33.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/args4j-2.33.jar b/bin/jbake-2.5.1/lib/args4j-2.33.jar
deleted file mode 100644
index 61be8f3..0000000
Binary files a/bin/jbake-2.5.1/lib/args4j-2.33.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/asciidoctorj-1.5.4.1.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/asciidoctorj-1.5.4.1.jar b/bin/jbake-2.5.1/lib/asciidoctorj-1.5.4.1.jar
deleted file mode 100644
index 78ad8d9..0000000
Binary files a/bin/jbake-2.5.1/lib/asciidoctorj-1.5.4.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/asm-5.0.3.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/asm-5.0.3.jar b/bin/jbake-2.5.1/lib/asm-5.0.3.jar
deleted file mode 100644
index 573535b..0000000
Binary files a/bin/jbake-2.5.1/lib/asm-5.0.3.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/asm-analysis-5.0.3.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/asm-analysis-5.0.3.jar b/bin/jbake-2.5.1/lib/asm-analysis-5.0.3.jar
deleted file mode 100644
index 8b73cf0..0000000
Binary files a/bin/jbake-2.5.1/lib/asm-analysis-5.0.3.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/asm-tree-5.0.3.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/asm-tree-5.0.3.jar b/bin/jbake-2.5.1/lib/asm-tree-5.0.3.jar
deleted file mode 100644
index e7eae53..0000000
Binary files a/bin/jbake-2.5.1/lib/asm-tree-5.0.3.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/asm-util-5.0.3.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/asm-util-5.0.3.jar b/bin/jbake-2.5.1/lib/asm-util-5.0.3.jar
deleted file mode 100644
index e89f1b7..0000000
Binary files a/bin/jbake-2.5.1/lib/asm-util-5.0.3.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/attoparser-2.0.2.RELEASE.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/attoparser-2.0.2.RELEASE.jar b/bin/jbake-2.5.1/lib/attoparser-2.0.2.RELEASE.jar
deleted file mode 100644
index daba134..0000000
Binary files a/bin/jbake-2.5.1/lib/attoparser-2.0.2.RELEASE.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/commons-collections-3.2.2.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/commons-collections-3.2.2.jar b/bin/jbake-2.5.1/lib/commons-collections-3.2.2.jar
deleted file mode 100644
index fa5df82..0000000
Binary files a/bin/jbake-2.5.1/lib/commons-collections-3.2.2.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/commons-configuration-1.10.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/commons-configuration-1.10.jar b/bin/jbake-2.5.1/lib/commons-configuration-1.10.jar
deleted file mode 100644
index 7922436..0000000
Binary files a/bin/jbake-2.5.1/lib/commons-configuration-1.10.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/commons-io-2.5.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/commons-io-2.5.jar b/bin/jbake-2.5.1/lib/commons-io-2.5.jar
deleted file mode 100644
index 107b061..0000000
Binary files a/bin/jbake-2.5.1/lib/commons-io-2.5.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/commons-jexl-2.1.1.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/commons-jexl-2.1.1.jar b/bin/jbake-2.5.1/lib/commons-jexl-2.1.1.jar
deleted file mode 100644
index d160a23..0000000
Binary files a/bin/jbake-2.5.1/lib/commons-jexl-2.1.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/commons-lang-2.6.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/commons-lang-2.6.jar b/bin/jbake-2.5.1/lib/commons-lang-2.6.jar
deleted file mode 100644
index 98467d3..0000000
Binary files a/bin/jbake-2.5.1/lib/commons-lang-2.6.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/commons-lang3-3.4.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/commons-lang3-3.4.jar b/bin/jbake-2.5.1/lib/commons-lang3-3.4.jar
deleted file mode 100644
index 8ec91d4..0000000
Binary files a/bin/jbake-2.5.1/lib/commons-lang3-3.4.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/commons-logging-1.1.1.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/commons-logging-1.1.1.jar b/bin/jbake-2.5.1/lib/commons-logging-1.1.1.jar
deleted file mode 100644
index 1deef14..0000000
Binary files a/bin/jbake-2.5.1/lib/commons-logging-1.1.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/commons-vfs2-2.1.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/commons-vfs2-2.1.jar b/bin/jbake-2.5.1/lib/commons-vfs2-2.1.jar
deleted file mode 100644
index d00c947..0000000
Binary files a/bin/jbake-2.5.1/lib/commons-vfs2-2.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/concurrentlinkedhashmap-lru-1.4.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/concurrentlinkedhashmap-lru-1.4.jar b/bin/jbake-2.5.1/lib/concurrentlinkedhashmap-lru-1.4.jar
deleted file mode 100644
index 572b258..0000000
Binary files a/bin/jbake-2.5.1/lib/concurrentlinkedhashmap-lru-1.4.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/freemarker-2.3.25-incubating.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/freemarker-2.3.25-incubating.jar b/bin/jbake-2.5.1/lib/freemarker-2.3.25-incubating.jar
deleted file mode 100644
index 76be1c0..0000000
Binary files a/bin/jbake-2.5.1/lib/freemarker-2.3.25-incubating.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/groovy-2.4.8.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/groovy-2.4.8.jar b/bin/jbake-2.5.1/lib/groovy-2.4.8.jar
deleted file mode 100644
index be156d8..0000000
Binary files a/bin/jbake-2.5.1/lib/groovy-2.4.8.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/groovy-templates-2.4.8.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/groovy-templates-2.4.8.jar b/bin/jbake-2.5.1/lib/groovy-templates-2.4.8.jar
deleted file mode 100644
index c570602..0000000
Binary files a/bin/jbake-2.5.1/lib/groovy-templates-2.4.8.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/groovy-xml-2.4.8.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/groovy-xml-2.4.8.jar b/bin/jbake-2.5.1/lib/groovy-xml-2.4.8.jar
deleted file mode 100644
index 2017576..0000000
Binary files a/bin/jbake-2.5.1/lib/groovy-xml-2.4.8.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jade4j-1.2.5.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jade4j-1.2.5.jar b/bin/jbake-2.5.1/lib/jade4j-1.2.5.jar
deleted file mode 100644
index 1dfa32e..0000000
Binary files a/bin/jbake-2.5.1/lib/jade4j-1.2.5.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/javassist-3.20.0-GA.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/javassist-3.20.0-GA.jar b/bin/jbake-2.5.1/lib/javassist-3.20.0-GA.jar
deleted file mode 100644
index 0f1ff72..0000000
Binary files a/bin/jbake-2.5.1/lib/javassist-3.20.0-GA.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/javax.servlet-3.0.0.v201112011016.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/javax.servlet-3.0.0.v201112011016.jar b/bin/jbake-2.5.1/lib/javax.servlet-3.0.0.v201112011016.jar
deleted file mode 100644
index b135409..0000000
Binary files a/bin/jbake-2.5.1/lib/javax.servlet-3.0.0.v201112011016.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jcommander-1.35.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jcommander-1.35.jar b/bin/jbake-2.5.1/lib/jcommander-1.35.jar
deleted file mode 100644
index e86b47b..0000000
Binary files a/bin/jbake-2.5.1/lib/jcommander-1.35.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jetty-continuation-8.1.19.v20160209.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jetty-continuation-8.1.19.v20160209.jar b/bin/jbake-2.5.1/lib/jetty-continuation-8.1.19.v20160209.jar
deleted file mode 100644
index ce0a9f5..0000000
Binary files a/bin/jbake-2.5.1/lib/jetty-continuation-8.1.19.v20160209.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jetty-http-8.1.19.v20160209.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jetty-http-8.1.19.v20160209.jar b/bin/jbake-2.5.1/lib/jetty-http-8.1.19.v20160209.jar
deleted file mode 100644
index 6e947b6..0000000
Binary files a/bin/jbake-2.5.1/lib/jetty-http-8.1.19.v20160209.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jetty-io-8.1.19.v20160209.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jetty-io-8.1.19.v20160209.jar b/bin/jbake-2.5.1/lib/jetty-io-8.1.19.v20160209.jar
deleted file mode 100644
index 49bc708..0000000
Binary files a/bin/jbake-2.5.1/lib/jetty-io-8.1.19.v20160209.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jetty-server-8.1.19.v20160209.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jetty-server-8.1.19.v20160209.jar b/bin/jbake-2.5.1/lib/jetty-server-8.1.19.v20160209.jar
deleted file mode 100644
index 507bb54..0000000
Binary files a/bin/jbake-2.5.1/lib/jetty-server-8.1.19.v20160209.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jetty-util-8.1.19.v20160209.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jetty-util-8.1.19.v20160209.jar b/bin/jbake-2.5.1/lib/jetty-util-8.1.19.v20160209.jar
deleted file mode 100644
index 6acb419..0000000
Binary files a/bin/jbake-2.5.1/lib/jetty-util-8.1.19.v20160209.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jna-4.0.0.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jna-4.0.0.jar b/bin/jbake-2.5.1/lib/jna-4.0.0.jar
deleted file mode 100644
index 9038048..0000000
Binary files a/bin/jbake-2.5.1/lib/jna-4.0.0.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jna-platform-4.0.0.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jna-platform-4.0.0.jar b/bin/jbake-2.5.1/lib/jna-platform-4.0.0.jar
deleted file mode 100644
index 4b3d567..0000000
Binary files a/bin/jbake-2.5.1/lib/jna-platform-4.0.0.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jruby-complete-1.7.25.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jruby-complete-1.7.25.jar b/bin/jbake-2.5.1/lib/jruby-complete-1.7.25.jar
deleted file mode 100644
index c1aa930..0000000
Binary files a/bin/jbake-2.5.1/lib/jruby-complete-1.7.25.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/json-simple-1.1.1.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/json-simple-1.1.1.jar b/bin/jbake-2.5.1/lib/json-simple-1.1.1.jar
deleted file mode 100644
index dfd5856..0000000
Binary files a/bin/jbake-2.5.1/lib/json-simple-1.1.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/jul-to-slf4j-1.7.22.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/jul-to-slf4j-1.7.22.jar b/bin/jbake-2.5.1/lib/jul-to-slf4j-1.7.22.jar
deleted file mode 100644
index 2a3e000..0000000
Binary files a/bin/jbake-2.5.1/lib/jul-to-slf4j-1.7.22.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/logback-classic-1.1.9.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/logback-classic-1.1.9.jar b/bin/jbake-2.5.1/lib/logback-classic-1.1.9.jar
deleted file mode 100644
index eaa2925..0000000
Binary files a/bin/jbake-2.5.1/lib/logback-classic-1.1.9.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/logback-core-1.1.9.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/logback-core-1.1.9.jar b/bin/jbake-2.5.1/lib/logback-core-1.1.9.jar
deleted file mode 100644
index ea355ac..0000000
Binary files a/bin/jbake-2.5.1/lib/logback-core-1.1.9.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/logback.xml
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/logback.xml b/bin/jbake-2.5.1/lib/logback.xml
deleted file mode 100644
index 31b0905..0000000
--- a/bin/jbake-2.5.1/lib/logback.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<configuration>
-
- <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <!-- <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> -->
- <pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern>
- </encoder>
- </appender>
-
- <logger name="org.thymeleaf" level="WARN"/>
- <logger name="org.asciidoctor" level="INFO"/>
-
- <!-- Strictly speaking, the level attribute is not necessary since -->
- <!-- the level of the root level is set to DEBUG by default. -->
- <root level="DEBUG">
- <appender-ref ref="CONSOLE" />
- </root>
-
-</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/ognl-3.1.12.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/ognl-3.1.12.jar b/bin/jbake-2.5.1/lib/ognl-3.1.12.jar
deleted file mode 100644
index 3007532..0000000
Binary files a/bin/jbake-2.5.1/lib/ognl-3.1.12.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/orient-commons-1.7.10.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/orient-commons-1.7.10.jar b/bin/jbake-2.5.1/lib/orient-commons-1.7.10.jar
deleted file mode 100644
index cb95346..0000000
Binary files a/bin/jbake-2.5.1/lib/orient-commons-1.7.10.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/orientdb-core-1.7.10.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/orientdb-core-1.7.10.jar b/bin/jbake-2.5.1/lib/orientdb-core-1.7.10.jar
deleted file mode 100644
index 8071c31..0000000
Binary files a/bin/jbake-2.5.1/lib/orientdb-core-1.7.10.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/orientdb-nativeos-1.7.10.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/orientdb-nativeos-1.7.10.jar b/bin/jbake-2.5.1/lib/orientdb-nativeos-1.7.10.jar
deleted file mode 100644
index 8f8dba6..0000000
Binary files a/bin/jbake-2.5.1/lib/orientdb-nativeos-1.7.10.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/parboiled-core-1.1.7.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/parboiled-core-1.1.7.jar b/bin/jbake-2.5.1/lib/parboiled-core-1.1.7.jar
deleted file mode 100644
index ee49777..0000000
Binary files a/bin/jbake-2.5.1/lib/parboiled-core-1.1.7.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/parboiled-java-1.1.7.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/parboiled-java-1.1.7.jar b/bin/jbake-2.5.1/lib/parboiled-java-1.1.7.jar
deleted file mode 100644
index e3289cd..0000000
Binary files a/bin/jbake-2.5.1/lib/parboiled-java-1.1.7.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/pegdown-1.6.0.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/pegdown-1.6.0.jar b/bin/jbake-2.5.1/lib/pegdown-1.6.0.jar
deleted file mode 100644
index 9eb06e6..0000000
Binary files a/bin/jbake-2.5.1/lib/pegdown-1.6.0.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/slf4j-api-1.7.22.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/slf4j-api-1.7.22.jar b/bin/jbake-2.5.1/lib/slf4j-api-1.7.22.jar
deleted file mode 100644
index 3c3d953..0000000
Binary files a/bin/jbake-2.5.1/lib/slf4j-api-1.7.22.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/snappy-java-1.1.0.1.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/snappy-java-1.1.0.1.jar b/bin/jbake-2.5.1/lib/snappy-java-1.1.0.1.jar
deleted file mode 100644
index 3ef919f..0000000
Binary files a/bin/jbake-2.5.1/lib/snappy-java-1.1.0.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/thymeleaf-3.0.3.RELEASE.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/thymeleaf-3.0.3.RELEASE.jar b/bin/jbake-2.5.1/lib/thymeleaf-3.0.3.RELEASE.jar
deleted file mode 100644
index d1c4553..0000000
Binary files a/bin/jbake-2.5.1/lib/thymeleaf-3.0.3.RELEASE.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/bin/jbake-2.5.1/lib/unbescape-1.1.4.RELEASE.jar
----------------------------------------------------------------------
diff --git a/bin/jbake-2.5.1/lib/unbescape-1.1.4.RELEASE.jar b/bin/jbake-2.5.1/lib/unbescape-1.1.4.RELEASE.jar
deleted file mode 100644
index 6e46339..0000000
Binary files a/bin/jbake-2.5.1/lib/unbescape-1.1.4.RELEASE.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/.htaccess
----------------------------------------------------------------------
diff --git a/content/.htaccess b/content/.htaccess
deleted file mode 100644
index e63d607..0000000
--- a/content/.htaccess
+++ /dev/null
@@ -1,8 +0,0 @@
-ErrorDocument 403 /errors/403.html
-ErrorDocument 404 /errors/404.html
-
-Redirect Permanent /downloads.html /downloads.cgi
-Redirect Permanent /media.html /
-Redirect Permanent /plugins.html /
-Redirect Permanent /documentation/the-sling-engine/eventing-and-jobs.html /documentation/bundles/apache-sling-eventing-and-job-handling.html
-Redirect Permanent /documentation/bundles/scripting/scripting-sightly.html /documentation/bundles/scripting/scripting-htl.html
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/apidocs/TODO.md
----------------------------------------------------------------------
diff --git a/content/apidocs/TODO.md b/content/apidocs/TODO.md
deleted file mode 100644
index 48f6d15..0000000
--- a/content/apidocs/TODO.md
+++ /dev/null
@@ -1,5 +0,0 @@
-title=
-type=page
-status=published
-~~~~~~
-TODO: re-add apidocs
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/components/TODO.md
----------------------------------------------------------------------
diff --git a/content/components/TODO.md b/content/components/TODO.md
deleted file mode 100644
index 79d497b..0000000
--- a/content/components/TODO.md
+++ /dev/null
@@ -1,5 +0,0 @@
-title=
-type=page
-status=published
-~~~~~~
-TODO re-add content/components
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/contributing.md
----------------------------------------------------------------------
diff --git a/content/contributing.md b/content/contributing.md
deleted file mode 100644
index fcb586c..0000000
--- a/content/contributing.md
+++ /dev/null
@@ -1,20 +0,0 @@
-title=Contributing
-type=page
-status=published
-~~~~~~
-
-See [Project Information](/project-information.html) for details about the tools mentioned below.
-
-Apache Sling is a volunteer effort, so there is always plenty of work that needs to be accomplished. If you want to help support Sling, this page is intended as a starting point for specific contribution ideas. To further understand how the Sling community operates, refer to the Community Roles and Processes document and/or join the mailing lists.
-
-The Sling project organizes its "to do" list using the JIRA issue tracking system. Specific items from Sling's JIRA issue tracking system are highlighted on this page, but are not limited to it. The purpose of the list here is to highlight issues that are either more important or serve as good entry points for new contributors.
-
-It is important to point out that you do not need to be a programmer to contribute to Sling. As such, we will break out the list of issues below for non-programmers and programmers.
-
-## Non-Programmers
-
-Improve web site or documentation (e.g., create/propose FAQ entries). There is no specific JIRA issue for this task, but any contributions could be posted as new JIRA issues for the Documentation component.
-
-## Programmers
-
-Implement support for various rendering technologies in Sling. Examples coming to mind are JSF and Wicket.
[22/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/mimetypes.png
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/mimetypes.png b/content/documentation/bundles/mimetypes.png
deleted file mode 100644
index ec54519..0000000
Binary files a/content/documentation/bundles/mimetypes.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/models.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/models.md b/content/documentation/bundles/models.md
deleted file mode 100644
index 21669bf..0000000
--- a/content/documentation/bundles/models.md
+++ /dev/null
@@ -1,522 +0,0 @@
-title=Sling Models
-type=page
-status=published
-~~~~~~
-
-[TOC]
-
-Many Sling projects want to be able to create model objects - POJOs which are automatically mapped from Sling objects, typically resources, but also request objects. Sometimes these POJOs need OSGi services as well.
-
-# Design Goals
-
-* Entirely annotation driven. "Pure" POJOs.
-* Use standard annotations where possible.
-* Pluggable
-* OOTB, support resource properties (via ValueMap), SlingBindings, OSGi services, request attributes
-* Adapt multiple objects - minimal required Resource and SlingHttpServletRequest
-* Client doesn't know/care that these objects are different than any other adapter factory
-* Support both classes and interfaces.
-* Work with existing Sling infrastructure (i.e. not require changes to other bundles).
-
-# Basic Usage
-In the simplest case, the class is annotated with `@Model` and the adaptable class. Fields which need to be injected are annotated with `@Inject`:
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-
-@Inject
-private String propertyName;
-}
-
-In this case, a property named "propertyName" will be looked up from the Resource (after first adapting it to a `ValueMap`) and it is injected.
-
-For an interface, it is similar:
-
-::java
-@Model(adaptables=Resource.class)
-public interface MyModel {
-
-@Inject
-String getPropertyName();
-}
-
-Constructor injection is also supported (as of Sling Models 1.1.0):
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-@Inject
-public MyModel(@Named("propertyName") String propertyName) {
-// constructor code
-}
-}
-
-Because the name of a constructor argument parameter cannot be detected via the Java Reflection API a `@Named` annotation is mandatory for injectors that require a name for resolving the injection.
-
-In order for these classes to be picked up, there is a header which must be added to the bundle's manifest:
-
-<Sling-Model-Packages>
-org.apache.sling.models.it.models
-</Sling-Model-Packages>
-
-This header must contain all packages which contain model classes or interfaces. However, subpackages need not be listed
-individually, e.g. the header above will also pick up model classes in `org.apache.sling.models.it.models.sub`. Multiple packages
-can be listed in a comma-separated list (any whitespace will be removed):
-
-<Sling-Model-Packages>
-org.apache.sling.models.it.models,
-org.apache.sling.other.models
-</Sling-Model-Packages>
-
-Alternatively it is possible to list all classes individually that are Sling Models classes via the `Sling-Model-Classes` header.
-
-If you use the Sling Models bnd plugin all required bundle headers are generated automatically at build time (see chapter 'Registration of Sling Models classes via bnd plugin' below).
-
-# Client Code
-## adaptTo()
-
-Client code doesn't need to be aware that Sling Models is being used. It just uses the Sling Adapter framework:
-
-::java
-MyModel model = resource.adaptTo(MyModel.class)
-
-Or
-
-::jsp
-<sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.models.it.models.MyModel" var="model"/>
-
-Or
-
-::jsp
-${sling:adaptTo(resource, 'org.apache.sling.models.it.models.MyModel')}
-
-As with other AdapterFactories, if the adaptation can't be made for any reason, `adaptTo()` returns null.
-## ModelFactory (since 1.2.0)
-*See also [SLING-3709](https://issues.apache.org/jira/browse/SLING-3709)*
-
-Since Sling Models 1.2.0 there is another way of instantiating models. The OSGi service `ModelFactory` provides a method for instantiating a model that throws exceptions. This is not allowed by the Javadoc contract of the adaptTo method. That way `null` checks are not necessary and it is easier to see why instantiation of the model failed.
-
-::java
-try {
-MyModel model = modelFactory.createModel(object, MyModel.class);
-} catch (Exception e) {
-// give out error message that the model could not be instantiated.
-// The exception contains further information.
-// See the javadoc of the ModelFactory for which Exception can be expected here
-}
-
-In addition `ModelFactory` provides methods for checking whether a given class is a model at all (having the model annotation) or whether a class can be adapted from a given adaptable.
-
-# Other Options
-## Names
-If the field or method name doesn't exactly match the property name, `@Named` can be used:
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-
-@Inject @Named("secondPropertyName")
-private String otherName;
-}
-
-## Optional and Required
-`@Inject`ed fields/methods are assumed to be required. To mark them as optional, use `@Optional`:
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-
-@Inject @Optional
-private String otherName;
-}
-
-If a majority of `@Inject`ed fields/methods are optional, it is possible (since Sling Models API 1.0.2/Impl 1.0.6) to change the default injection
-strategy by using adding `defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL` to the `@Model` annotation:
-
-::java
-@Model(adaptables=Resource.class, defaultInjectionStrategy=DefaultInjectionStrategy.OPTIONAL)
-public class MyModel {
-
-@Inject
-private String otherName;
-}
-
-To still mark some fields/methods as being mandatory while relying on `defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL` for all other fields, the annotation `@Required` can be used.
-
-`@Optional` annotations are only evaluated when using the `defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED` (which is the default), `@Required` annotations only if using `defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL`.
-
-## Defaults
-A default value can be provided (for Strings & primitives):
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-
-@Inject @Default(values="defaultValue")
-private String name;
-}
-
-Defaults can also be arrays:
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-
-@Inject @Default(intValues={1,2,3,4})
-private int[] integers;
-}
-
-
-OSGi services can be injected:
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-
-@Inject
-private ResourceResolverFactory resourceResolverFactory;
-}
-
-
-In this case, the name is not used -- only the class name.
-
-## Collections
-Lists and arrays are supported by some injectors. For the details look at the table given in [Available Injectors](#available-injectors):
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-
-@Inject
-private List<Servlet> servlets;
-}
-
-List injection for *child resources* works by injecting grand child resources (since Sling Models Impl 1.0.6). For example, the class
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-
-@Inject
-private List<Resource> addresses;
-}
-
-Is suitable for a resource structure such as:
-
-+- resource (being adapted)
-|
-+- addresses
-|
-+- address1
-|
-+- address2
-
-In this case, the `addresses` `List` will contain `address1` and `address2`.
-
-## OSGi Service Filters
-OSGi injection can be filtered:
-
-::java
-@Model(adaptables=SlingHttpServletRequest.class)
-public class MyModel {
-
-@Inject
-private PrintWriter out;
-
-@Inject
-@Named("log")
-private Logger logger;
-
-@Inject
-@Filter("(paths=/bin/something)")
-private List<Servlet> servlets;
-}
-
-## PostConstruct Methods
-The `@PostConstruct` annotation can be used to add methods which are invoked upon completion of all injections:
-
-::java
-@Model(adaptables=SlingHttpServletRequest.class)
-public class MyModel {
-
-@Inject
-private PrintWriter out;
-
-@Inject
-@Named("log")
-private Logger logger;
-
-@PostConstruct
-protected void sayHello() {
-logger.info("hello");
-}
-}
-
-`@PostConstruct` methods in a super class will be invoked first.
-
-## Via
-If the injection should be based on a JavaBean property of the adaptable, you can indicate this using the `@Via` annotation:
-
-::java
-@Model(adaptables=SlingHttpServletRequest.class)
-public interface MyModel {
-
-// will return request.getResource().adaptTo(ValueMap.class).get("propertyName", String.class)
-@Inject @Via("resource")
-String getPropertyName();
-}
-
-## Source
-If there is ambiguity where a given injection could be handled by more than one injector, the `@Source` annotation can be used to define which injector is responsible:
-
-::java
-@Model(adaptables=SlingHttpServletRequest.class)
-public interface MyModel {
-
-// Ensure that "resource" is retrived from the bindings, not a request attribute
-@Inject @Source("script-bindings")
-Resource getResource();
-}
-
-## Adaptations
-If the injected object does not match the desired type and the object implements the `Adaptable` interface, Sling Models will try to adapt it. This provides the ability to create rich object graphs. For example:
-
-::java
-@Model(adaptables=Resource.class)
-public interface MyModel {
-
-@Inject
-ImageModel getImage();
-}
-
-@Model(adaptables=Resource.class)
-public interface ImageModel {
-
-@Inject
-String getPath();
-}
-
-When a resource is adapted to `MyModel`, a child resource named `image` is automatically adapted to an instance of `ImageModel`.
-
-Constructor injection is supported for the adaptable itself. For example:
-
-::java
-@Model(adaptables=Resource.class)
-public class MyModel {
-
-public MyModel(Resource resource) {
-this.resource = resource;
-}
-
-private final Resource resource;
-
-@Inject
-private String propertyName;
-}
-
-## Sling Validation (since 1.2.0)
-<a name="validation">*See also [SLING-4161](https://issues.apache.org/jira/browse/SLING-4161)*</a>
-
-You can use the attribute `validation` on the Model annotation to call a validation service on the resource being used by the Sling model. That attribute supports three different values:
-
-Value | Description | Invalid validation model | No validation model found | Resource invalid according to model
------ | ------- | ------------- | -------------| ---------
-`DISABLED` (default) | don't validate the resource bound to the Model | Model instantiated | Model instantiated | Model instantiated
-`REQUIRED` | enforce validation of the resource bound to the Model | Model not instantiated | Model not instantiated | Model not instantiated
-`OPTIONAL` | validate the resource bound to the Model (if a validation model is found) | Model not instantiated | Model instantiated | Model not instantiated
-
-In case the model is not instantiated an appropriate error message is logged (if `adaptTo()` is used) or an appropriate exception is thrown (if `ModelFactory.createModel()` is used).
-
-The only implementation for this Sling Models validation service is leveraging [Sling Validation](/documentation/bundles/validation.html) and is located in the bundle [org.apache.sling.models.validation-impl](https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/validation-impl/). Validation is only working on models which are adapted from either `Resource` or `SlingHttpServletRequest` and if the Sling Validation Bundle is deployed.
-
-# Custom Injectors
-
-To create a custom injector, simply implement the `org.apache.sling.models.spi.Injector` interface and register your implementation with the OSGi service registry. Please refer to the standard injectors in [Subversion](http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/injectors/) for examples.
-
-Injectors are invoked in order of their service ranking, from lowest to highest. See the table below for the rankings of the standard injectors.
-
-# Annotation Reference
-`@Model`
-: declares a model class or interface
-
-`@Inject`
-: marks a field or method as injectable
-
-`@Named`
-: declare a name for the injection (otherwise, defaults based on field or method name).
-
-`@Optional`
-: marks a field or method injection as optional
-
-`@Source`
-: explictly tie an injected field or method to a particular injector (by name). Can also be on other annotations.
-
-`@Filter`
-: an OSGi service filter
-
-`@PostConstruct`
-: methods to call upon model option creation (only for model classes)
-
-`@Via`
-: use a JavaBean property of the adaptable as the source of the injection
-
-`@Default`
-: set default values for a field or method
-
-`@Path`
-: only used together with the resource-path injector to specify the path of a resource
-
-`@Exporters`/`@Exporter`/`@ExporterOptions`/`@ExporterOption`
-: See Exporter Framework section below
-
-In addition all [injector-specific annotations](#injector-specific-annotations).
-
-# Available Injectors
-
-Title | Name (for `@Source`) | Service Ranking | Available Since (Implementation Version) | Description | Applicable To (including using `@Via`) | Accepts Null Name? | Array Support | Parameterized Type Support
------------------ | ----------------------- | ------------------- | ---------------------------------------- | ------------ | -------------------------------------- | ------------------ | ------------- | --------------------------
-Script Bindings | `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.
-Value Map | `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.
-Child Resources | `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.
-Request Attributes | `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.
-OSGi Services | `osgi-services` | 5000 | 1.0.0 | Lookup services based on class name. Since Sling Models Impl 1.2.8 ([SLING-5664](https://issues.apache.org/jira/browse/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.
-Resource Path | `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
-Self | `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
-Sling Object | `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](https://issues.apache.org/jira/browse/SLING-4083). Also `Resource`s 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
-
-# Injector-specific Annotations
-
-*Introduced with [SLING-3499](https://issues.apache.org/jira/browse/SLING-3499) in Sling Models Impl 1.0.6*
-
-Sometimes it is desirable to use customized annotations which aggregate the standard annotations described above. This will generally have
-the following advantages over using the standard annotations:
-
-* Less code to write (only one annotation is necessary in most of the cases)
-* More robust (in case of name collisions among the different injectors, you make sure that the right injector is used)
-* Better IDE support (because the annotations provide elements for each configuration which is available for that specific injector, i.e. `filter` only for OSGi services)
-
-The follow annotations are provided which are tied to specific injectors:
-
-Annotation | Supported Optional Elements | Injector | Description
------------------ | ------------------------------ |-------------------------
-`@ScriptVariable` | `injectionStrategy` and `name` | `script-bindings` | Injects the script variable defined via [Sling Bindings](https://cwiki.apache.org/confluence/display/SLING/Scripting+variables). If `name` is not set the name is derived from the method/field name.
-`@ValueMapValue` | `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.
-`@ChildResource` | `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.
-`@RequestAttribute` | `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.
-`@ResourcePath` | `injectionStrategy`, `path`, and `name` | `resource-path` | Injects a resource either by path or by reading a property with the given name.
-`@OSGiService` | `injectionStrategy`, `filter` | `osgi-services` | Injects an OSGi service by type. The `filter` can be used give an OSGi service filter.
-`@Self` | `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.
-`@SlingObject` | `injectionStrategy` | `sling-object` |Injects commonly used sling objects if the field matches with the class: request, response, resource resolver, current resource, SlingScriptHelper
-
-## Hints
-
-Those annotations replace `@Via`, `@Filter`, `@Named`, `@Optional`, `@Required`, `@Source` and `@Inject`.
-Instead of using the deprecated annotation element `optional` you should rather use `injectionStrategy` with the values `DEFAULT`, `OPTIONAL` or `REQUIRED` (see also [SLING-4155](https://issues.apache.org/jira/browse/SLING-4155)).
-`@Default` may still be used in addition to the injector-specific annotation to set default values. All elements given above are optional.
-
-## Custom Annotations
-
-To create a custom annotation, implement the `org.apache.sling.models.spi.injectorspecific.StaticInjectAnnotationProcessorFactory` interface.
-This interface may be implemented by the same class as implements an injector, but this is not strictly necessary. Please refer to the
-injectors in [Subversion](http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/injectors/) for examples.
-
-# Specifying an Alternate Adapter Class (since 1.1.0)
-
-By default, each model class is registered using its own implementation class as adapter. If the class has additional interfaces this is not relevant.
-
-The `@Model` annotations provides an optional `adapters` attribute which allows specifying under which type(s) the model
-implementation should be registered in the Models Adapter Factory. Prior to *Sling Models Impl 1.3.10* only the given class names
-are used as adapter classes, since 1.3.10 the implementation class is always being registered implicitly as adapter as well (see [SLING-6658](https://issues.apache.org/jira/browse/SLING-6658)).
-With this attribute it is possible to register the model
-to one (or multiple) interfaces, or a superclass. This allows separating the model interface from the implementation, which
-makes it easier to provide mock implementations for unit tests as well.
-
-Example:
-
-::java
-@Model(adaptables = Resource.class, adapters = MyService.class)
-public class MyModel implements MyService {
-// injects fields and implements the MyService methods
-}
-
-In this example a `Resource` can be adapted to a `MyService` interface, and the Sling Models implementation instantiates a
-`MyModel` class for this.
-
-It is possible to have multiple models implementing the same interface. By default Sling Models will just take the first one
-ordered alphabetically by the class name. Applications can provide an OSGi service implementing the `ImplementationPicker`
-SPI interface which could use context to determine which implementation can be chosen, e.g. depending an a tenant or
-content path context. If multiple implementations of the `ImplementationPicker` interface are present, they are queried
-one after another in order of their service ranking property, the first one that picks an implementation wins.
-
-# Associating a Model Class with a Resource Type (since 1.3.0)
-
-The `@Model` annotation provides an optional `resourceType` attribute which allows for model classes to be associated with one or
-more resource types. This is used in three different ways.
-
-In the case of multiple model classes implementing the same interface, the class with the "closest" resource type will be used when
-adapting to the interface.
-
-The `ModelFactory` service interface has methods `Object getModelFromResource(Resource)` and `Object getModelFromRequest(SlingHttpServletRequest)` which will dynamically determine the adapter class based on the `Resource` using its type. In the case of the `SlingHttpServletRequest` method, it uses the request's `Resource` object (i.e. by calling `request.getResource()`)
-
-The resource type is also used as part of the Exporter framework (see next section).
-
-# Exporter Framework (since 1.3.0)
-
-Sling Models objects can be exported to arbitrary Java objects through the Sling Models Exporter framework. Model objects can be
-programatically exported by calling the `ModelFactory` method `exportModel()`. This method takes as its arguments:
-
-* the model object
-* an exporter name
-* a target class
-* a map of options
-
-The exact semantics of the exporting will be determined by an implementation of the `ModelExporter` service interface. Sling Models
-currently includes a single exporter, using the Jackson framework, which is capable of serializing models as JSON or transforming them to `java.util.Map` objects.
-
-In addition, model objects can have servlets automatically registered for their resource type (if it is set) using the `@Exporter` annotation. For example, a model class with the annotation
-
-::java
-@Model(adaptable = Resource.class, resourceType = "myco/components/foo")
-@Exporter(name = "jackson", extensions = "json")
-
-results in the registration of a servlet with the resource type and extension specified and a selector of 'model' (overridable
-through the `@Exporter` annotation's `selector` attribute). When this servlet is invoked, the `Resource` will be adapted to the
-model, exported as a `java.lang.String` (via the named Exporter) and then returned to the client.
-
-
-# Registration of Sling Models classes via bnd plugin
-
-With the Sling Models bnd plugin it is possible to automatically generated the necessary bundle header to register the Sling Models classes contained in the Maven bundle project - either with maven-bundle-plugin or with bnd-maven-plugin. By default the plugin generates a `Sling-Model-Classes` header (only compatible with Sling Models Impl since version 1.3.4, see [SLING-6308](https://issues.apache.org/jira/browse/SLING-6308)).
-
-Example configuration:
-
-#!xml
-<plugin>
-<groupId>org.apache.felix</groupId>
-<artifactId>maven-bundle-plugin</artifactId>
-<extensions>true</extensions>
-<configuration>
-<instructions>
-<_plugin>org.apache.sling.bnd.models.ModelsScannerPlugin</_plugin>
-</instructions>
-</configuration>
-<dependencies>
-<dependency>
-<groupId>org.apache.sling</groupId>
-<artifactId>org.apache.sling.bnd.models</artifactId>
-<version>1.0.0</version>
-</dependency>
-</dependencies>
-</plugin>
-
-If a `Sling-Model-Packages` or `Sling-Model-Classes` was already manually defined for the bundle the bnd plugin does nothing. So if you want to migrate an existing project to use this plugin remove the existing header definitions.
-
-If you want to generate a bundle header compliant with Sling Models < 1.3.4 (i.e. `Sling-Model-Packages`) you need to specify the attribute `generatePackagesHeader=true`. An example configuration looks like this
-
-#!xml
-<configuration>
-<instructions>
-<_plugin>org.apache.sling.bnd.models.ModelsScannerPlugin;generatePackagesHeader=true</_plugin>
-</instructions>
-</configuration>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/nosql-resource-providers.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/nosql-resource-providers.md b/content/documentation/bundles/nosql-resource-providers.md
deleted file mode 100644
index 8e765f8..0000000
--- a/content/documentation/bundles/nosql-resource-providers.md
+++ /dev/null
@@ -1,77 +0,0 @@
-title=NoSQL Resource Providers (org.apache.sling.nosql)
-type=page
-status=published
-~~~~~~
-[TOC]
-
-
-## Introduction
-
-Apache Sling provides resource-based access to NoSQL document stores like MongoDB and Couchbase via its Resource API using the NoSQL resource providers. This is possible in combination with a JCR-based repository (e.g. only on a special path in the resource tree), or a only persistence for the whole resource tree depending on the resource provider configuration.
-
-The general concept of retrieving from and storing resource data in NoSQL document stores is the same independently from the NoSQL product used:
-
-* For each resource a structured document is stored (usually in JSON format)
-* The path of the resource is the key of the document
-* The properties of the resource are stored in a map-like form in the document
-* Special mapping applies to convert special data types like numbers, dates and binary data to a format that can safely stored in the document event if the format is not natively supported (e.g. converting dates to strings and binary to base64)
-* The Sling CRUD support defines a simple transaction model with buffering all changes in memory until a call to "commit()" persists them to the NoSQL database
-* Iterating over child resources and deleting a resource including all descendants requires some basic query capabilities in the NoSQL store
-
-All these general features are implemented in an abstraction layer called ["Apache Sling NoSQL Generic Resource Provider"](https://github.com/apache/sling/tree/trunk/contrib/nosql/generic), which is used by the resource provider implementations per NoSQL product. Those implementation than only implement a thin "adapter" which maps the resource data to the NoSQL product-specific storage formats and query capabilities, without having to care about all the complex resource provider handling.
-
-This generic resource provider also contains a set of integration tests covering the most relevant resource read- and write usecases which can be used to test a NoSQL product-specific resource provider implementation and the underlying NoSQL database.
-
-
-## MongoDB NoSQL Resource Provider
-
-Resource provider for [MongoDB](https://www.mongodb.org/) NoSQL database.
-
-Tested with MongoDB Server 3.0.6 and MongoDB Java Driver 3.1.1.
-
-Configuration example:
-
-org.apache.sling.nosql.mongodb.resourceprovider.MongoDBNoSqlResourceProviderFactory.factory.config-default
-provider.roots=["/"]
-connectionString="localhost:27017"
-database="sling"
-collection="resources"
-
-See Apache Felix OSGi console for detailed documentation of the parameters. All resource data is stored in one Collection of one MongoDB database. Each resource is stored as a document with the path stored in an "_id" property.
-
-Source code: [Apache Sling NoSQL MongoDB Resource Provider](https://github.com/apache/sling/tree/trunk/contrib/nosql/mongodb-resourceprovider)
-
-Please note: there is an [alternative MongoDB resource provider implementation](https://github.com/apache/sling/tree/trunk/contrib/extensions/mongodb) from 2012 which has less features, a slightly different concept for storing resource data (in multiple collections), and it does not use the "Generic Resource Provider".
-
-
-## Couchbase NoSQL Resource Provider
-
-Resource provider for [Couchbase](http://www.couchbase.com/) NoSQL database.
-
-Tested with Couchbase Server 4.0.0 and Couchbase Java SDK 2.2.4. Please note: Couchbase 4 or higher is mandatory because N1QL support is required.
-
-Configuration example:
-
-org.apache.sling.nosql.couchbase.resourceprovider.CouchbaseNoSqlResourceProviderFactory.factory.config-default
-provider.roots=["/"]
-
-org.apache.sling.nosql.couchbase.client.CouchbaseClient.factory.config-default
-clientId="sling-resourceprovider-couchbase"
-couchbaseHosts="localhost:8091"
-bucketName="sling"
-enabled=B"true"
-
-See Apache Felix OSGi console for detailed documentation of the parameters. All resource data is stored in one Couchbase bucket. Each resource is stored as a document with the path as key.
-
-Source code: [Apache Sling NoSQL Couchbase Resource Provider](https://github.com/apache/sling/tree/trunk/contrib/nosql/couchbase-resourceprovider)
-
-The resource provider requires and additional bundle [Apache Sling NoSQL Couchbase Client](https://github.com/apache/sling/tree/trunk/contrib/nosql/couchbase-client) which wraps the Couchbase Java SDK (which itself is not an OSGi bundle), and ensures that the Couchbase Environment instance is used as a singleton in the VM.
-
-
-## Example Launchpad
-
-An example launchpad is provided that contains the NoSQL resource providers configured as main resource provider at `/`.
-
-Source code: [Apache Sling NoSQL Launchpad](https://github.com/apache/sling/tree/trunk/contrib/nosql/launchpad)
-
-See README for details how to start the launchpad.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/org-apache-sling-junit-bundles.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/org-apache-sling-junit-bundles.md b/content/documentation/bundles/org-apache-sling-junit-bundles.md
deleted file mode 100644
index 8eae937..0000000
--- a/content/documentation/bundles/org-apache-sling-junit-bundles.md
+++ /dev/null
@@ -1,213 +0,0 @@
-title=JUnit server-side testing support bundles
-type=page
-status=published
-~~~~~~
-
-This is an overview of the Sling bundles that provide support for server-side JUnit tests.
-
-The Maven modules below [`testing/samples`](https://svn.apache.org/repos/asf/sling/trunk/testing/samples)
-provide different examples including HTTP-based and server-side teleported tests in a
-bundle module, running against a full Sling instance setup in the same Maven module.
-
-## org.apache.sling.junit.core: server-side JUnit tests support
-This bundle provides a `JUnitServlet` that runs JUnit tests found in bundles.
-
-<div class="warning">
-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.
-</div>
-
-<div class="note">
-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.
-</div>
-
-To make tests available to that servlet, the bundle that contains them must point to them
-with a `Sling-Test-Regexp` bundle header that defines a regular expression that matches
-the test class names, like for example:
-
-Sling-Test-Regexp=com.example.*ServerSideTest
-
-### 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
-
-1. creating the test bundle including all necessary classes for execution
-1. adding the `Sling-Test-Regexp` header to the bundles manifest
-1. deploy the bundle on an Sling server (with the help of the customizer)
-1. calling the `JUnitServlet` from the client-side and report back the results
-1. uninstalling the test bundle
-
-Most of these steps are done on the client-side by the org.apache.sling.junit.teleporter module (see below).
-
-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.
-
-Here's a basic example of a server-side test that accesses OSGi services:
-
-public class BasicTeleporterTest {
-
-@Rule
-public final TeleporterRule teleporter = TeleporterRule.forClass(getClass(), "Launchpad");
-
-@Test
-public void testConfigAdmin() throws IOException {
-final String pid = "TEST_" + getClass().getName() + UUID.randomUUID();
-
-final ConfigurationAdmin ca = teleporter.getService(ConfigurationAdmin.class);
-assertNotNull("Teleporter should provide a ConfigurationAdmin", ca);
-
-final Configuration cfg = ca.getConfiguration(pid);
-assertNotNull("Expecting to get a Configuration", cfg);
-assertEquals("Expecting the correct pid", pid, cfg.getPid());
-}
-}
-
-That's all there is to it, the `TeleporterRule` takes care of the rest.
-
-The test bundle being build and deployed through this rule usually happens quickly as the temporary bundle is
-very small. Both the client-side and server-side parts of the test can be debugged easily
-with the appropriate IDE settings.
-
-The `Teleporter.getService` method takes an optional OSGi LDAP filter for service
-selection, like for example:
-
-final StringTransformer t = teleporter.getService(StringTransformer.class, "(mode=uppercase)");
-
-The method waits for the service to be available or until the timeout elapsed ([SLING-6031](https://issues.apache.org/jira/browse/SLING-6031)).
-
-And starting with version 1.0.4 of the `org.apache.sling.junit.teleporter` bundle, you can specify
-resources to embed in the test bundle, as in this example:
-
-@Rule
-public final TeleporterRule teleporter =
-TeleporterRule.forClass(getClass(), "Launchpad")
-.withResources("/foo/", "/some/other/resource.txt");
-
-which will embed all resources found under `/foo` as well as the `resource.txt` in the test
-bundle, making them available to the server-side tests.
-
-This teleporter mechanism is used in our integration tests, search for `TeleporterRule` in there
-for examples or look at the
-[`integrationtest.teleporter`]( https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/teleporter)
-package.
-
-As I write this the teleporter mechanism is quite new, I suspect there might be some weird interactions
-between things like `@AfterClass`, custom test runners and this mechanism but it works well to a growing
-number of tests in our `launchpad/integration-tests` module. Moving to JUnit `Rules` as much as possible,
-and combining them using JUnit's `RuleChain`, should help work around such limitations if they arise.
-
-### More details on the JUnitServlet
-To try the JUnitServlet interactively, you can install a
-bundle that contains tests and a `Sling-Test-Regexp` bundle header that points to them, as
-described above. Or use the `TeleporterRule` and set a breakpoint in the tests execution, when the test bundle in
-installed and listed by the test servlet.
-
-To list the available tests, open `/system/sling/junit/` in your browser. The servlet shows available tests and allows
-you to execute them via a POST request.
-
-Adding a path allows you to select a specific subset of tests, as in
-`/system/sling/junit/org.apache.sling.junit.remote.html`
-
-The JUnitServlet provides various output formats, including in particular JSON, see
-`/system/sling/junit/.json` for example.
-
-## org.apache.sling.junit.teleporter: client-side TeleporterRule support
-This module provides the `ClientSideTeleporter` which the `TeleporterRule` uses to package the server-side tests
-in bundles that's installed temporarily on the test server. Almost all steps described above in [The TeleporterRule](#the-teleporterrule) are being performed by this module.
-
-This module is not a bundle, as it's used on the client only, as a dependency when running the tests.
-
-### TeleporterRule.Customizer ###
-A `TeleporterRule.Customizer` is used to setup the `ClientSideTeleporter`. That customizer is instantiated dynamically
-based on a String passed to the `TeleporterRule.forClass` method as 2nd parameter. As an example from our `launchpad/integration-tests` module, this call
-
-TeleporterRule.forClass(getClass(), "Launchpad:author");
-
-causes the `TeleporterRule` to use the `org.apache.sling.junit.teleporter.customizers.LaunchpadCustomizer` class
-to setup the `ClientSideTeleporter`, and passes the "author" string to it as an option. Although our current `LaunchpadCustomizer`
-does not use this options string, it is meant to select a specific server (of family of servers) to run the tests on.
-
-The options string can also use a full class name instead of the `Launchpad` short form used here, if needed. The part
-of that string that follows the first colon is passed to the customizer as is.
-
-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](https://issues.apache.org/jira/browse/SLING-5677), since version 1.0.8).
-
-The following customizers are currently used in Sling
-
-### Default Customizer ###
-
-*[DefaultPropertyBasedCustomizer.java](https://svn.apache.org/repos/asf/sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/DefaultPropertyBasedCustomizer.java)* is used by default when no other customizer is referenced in `TeleporterRule.forClass(getClass())`. It relies on the following system properties:
-
-| Property Name | Description | Mandatory to set | Default value | Since version | Related JIRA |
-|------------------------------|-------------------------------------------------|------------------| ----- | ---| --- |
-| `ClientSideTeleporter.baseUrl` | base url of the Sling Server to which to deploy. | yes | - | 1.0.8 | [SLING-5677](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/SLING-5677) |
-| `ClientSideTeleporter.serverUsername` | the username with which to send requests to the Sling server. | no | `admin` | 1.0.8 | [SLING-5677](https://issues.apache.org/jira/browse/SLING-5677) |
-| `ClientSideTeleporter.serverPassword` | the password with which to send requests to the Sling server. | no | `admin` | 1.0.8 | [SLING-5677](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/SLING-6546) |
-
-
-The provisioning of an appropriate instance can be done with the [slingstart-maven-plugin](/documentation/development/slingstart.html). An example for that is given at [`testing/samples/module-with-it`](https://svn.apache.org/viewvc/sling/trunk/testing/samples/module-with-it). Since `slingstart-maven-plugin` 1.5.0 it is possible to bootstrap a Sling Server from a `model.txt` below `src/test/provisioning` independent of the packaging (see [SLING-6068](https://issues.apache.org/jira/browse/SLING-6068)).
-
-#### LaunchpadCustomizer ####
-The *[`LaunchpadCustomizer.java`](https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/junit/teleporter/customizers/LaunchpadCustomizer.java)* only verifies that a Sling instance is ready at a given port and configures the `ClientSideTeleporter` to deploy to `http://localhost:8888` with the credentials `admin`:`admin`. `LaunchpadCustomizer` uses the `HttpTestBase` therefore some parameters are customizable through system properties. There is no bootstrapping of an instance done here, so this must be done separately!
-
-#### BWIT_TeleporterCustomizer ####
-The *[`BWIT_TeleporterCustomizer.java`](http://svn.apache.org/viewvc/sling/trunk/testing/samples/bundle-with-it/src/test/java/org/apache/sling/junit/teleporter/customizers/BWIT_TeleporterCustomizer.java)* relies on `SlingTestBase` to set the server's base url and credentials. Additionally the test bundle is adjusted so that the API is not included in it (but rather referenced from another bundle). The bootstrapping of the Sling instance is tweaked through system properties which are desribed [here](http://labs.6dglobal.com/blog/2013-06-05/creating-integration-tests-apache-sling/) and implicitly done by the customizer itself.
-
-Those should give you an overview on what can be done with a customizer and decide whether you need to write your own one or using the default customizer is just enough.
-
-## org.apache.sling.junit.healthcheck: run JUnit tests as Sling Health Checks
-This bundle allows JUnit tests to run as [Sling Health Checks](/documentation/bundles/sling-health-check-tool.html),
-which can be useful when defining smoke tests for example, allowing them to be used both at build time and run time.
-
-See the `JUnitHealthCheck` class for details.
-
-## org.apache.sling.junit.scriptable: scriptable server-side tests
-This bundle allows Sling scripts to be executed from the `JUnitServlet` as JUnit tests, as follows:
-
-* A node that has the `sling:Test` mixin is a scriptable test node.
-* For security reasons, scriptable test nodes are only executed as tests if they are found under `/libs` or `/apps`, or more precisely under a path that's part of Sling's `ResourceResolver` search path.
-* To execute a test, the scriptable tests provider makes an HTTP request to the test node's path, with a `.test.txt` selector and extension, and expects the output to contain only the string `TEST_PASSED`. Empty lines and comment lines starting with a hash sign (#) are ignored in the output, and other lines are reported as failures.
-
-Here's a minimal example that sets up and executes a scriptable test:
-
-$ curl -u admin:admin -Fjcr:primaryNodeType=sling:Folder -Fsling:resourceType=foo -Fjcr:mixinTypes=sling:Test http://localhost:8080/apps/foo
-...
-$ echo TEST_PASSED > /tmp/test.txt.esp ; curl -u admin:admin -T/tmp/test.txt.esp http://localhost:8080/apps/foo/test.txt.esp
-
-At this point, foo.test.txt is what the scriptable test framework will request, and that outputs just TEST_PASSED:
-
-$ curl -u admin:admin http://localhost:8080/apps/foo.test.txt
-TEST_PASSED
-
-And a POST to the JUnit servlet returns information on the test's execution:
-
-curl -u admin:admin -XPOST http://localhost:8080/system/sling/junit/org.apache.sling.junit.scriptable.ScriptableTestsProvider.json
-[{
-"INFO_TYPE": "test",
-"description": "verifyContent[0](org.apache.sling.junit.scriptable.TestAllPaths)",
-"test_metadata": {
-"test_execution_time_msec": 2
-}
-}
-]
-
-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.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/osgi-installer.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/osgi-installer.md b/content/documentation/bundles/osgi-installer.md
deleted file mode 100644
index 26a06ab..0000000
--- a/content/documentation/bundles/osgi-installer.md
+++ /dev/null
@@ -1,96 +0,0 @@
-title=OSGi Installer
-type=page
-status=published
-~~~~~~
-
-# Overview
-
-The OSGi installer is a central service for handling installs, updates and uninstall of "artifacts". By default, the installer supports bundles and has an extension for handling configurations for the OSGi configuration admin.
-
-![Apache Sling OSGI Installer Diagram](/documentation/bundles/Slide14.jpg)
-
-The OSGi installer itself is "just" the central service managing the tasks and states of the artifacts. The artifacts can be provided through various providers, e.g. through a file system provider reading artifacts from configured directories or the jcr provider reading artifacts from a JCR repository.
-
-A provider is just scanning for artifacts and their removal. It informs the OSGi installer about new artifacts and removed artifacts. The provider itself has usually no knowledge about the contents of an artifact. It does not know about bundles, configurations etc.
-
-As the OSGi installer itself is not performing the actual install, update or removal of an artifact, its possible to install transformers and installer factories. A transformer inspects the artifacts and tries to detect its type. By default, detecting of bundles and configurations is supported. The final service is an installer factory creating the actual task, like install this bundle, update that bundle etc.
-
-It's possible to add own providers, transformers and installer factories to support custom scenarios.
-
-## API
-The installer API is defined by the `org.apache.sling.installer.api` package
-of the [org.apache.sling.installer.core](http://svn.apache.org/repos/asf/sling/trunk/installer/core/) module. The main
-interface is the `OsgiInstaller` with which installable resources can be registered.
-
-The [installer integration tests][1] module can be useful to understand the details of how the installer works.
-
-## Artifact Handling
-
-Once an artifact is detected by a transformer, it gets a unique id. By default a bundle gets the symbolic name as the unique identifier and a configuration the PID.
-In addition to this id, an artifact gets a priority information from the provider. The priority is used if an artifact with the same id is provided several times from different locations. For example if a file system provider is scanning two directories and an artifact with the same id (like a configuration) is added to both directories, one should have precedence over the other. This is handled by the priority.
-
-Artifacts with the same unique id are grouped and then sorted by priority and maybe other artifact dependent metadata like the bundle version. Only the first artifact in this sorted group is tried to be applied!
-
-## Bundle Handling
-
-In general, the OSGi installer always tries to install the highest version of a bundle if several bundles with the same symbolic name are provided. In this case higher version wins over priority.
-If an installed bundle is removed by a provider, for example deleted in the repository, the OSGi installer uninstall the bundle.
-If a bundle is removed from a provider which is currently not installed, this has no effect at all.
-If an installed bundle is removed and another version of this bundle is provided (a lower version), than this one is installed instead. This is basically a downgrade of the bundle.
-If a bundle is installed and a higher version is provided, an upgrade is performed.
-If an installed bundle is managed via any other OSGi tooling, like uninstalling it through the web console, the OSGi installer does no action at all!
-
-If a failure occurs during bundle installation or update, the OSGi installer will retry this as soon as another bundle has been installed. The common use case is an application installation with several bundles where one bundle depends on another. As they are installed in arbitrary order, this mechanism ensures that in the end all bundles are properly wired and installed.
-
-When all artifacts have been processed (either install, update or delete), a package refresh is automatically called.
-
-### Versions and Snapshots
-
-The OSGi installer asumes that a symbolic name and version (not a snapshot version) uniquely identifies a bundle. Obviously this is a common development requirement that a released version of an artifact never changes over time. Therefore, once a bundle with a specific version is installed, it will not be reinstalled if the corresponding artifact changes. For example, if bundle A with version 1.0 is put into the JCR repository, it gets installed. If now this jar in the repository is overwritten either with the same contents or with a different one, and this new artifact has again A as the symbolic name and version set to 1.0, nothing will happen as this exact bundle is already installed.
-
-During development, SNAPSHOT versions should be used, like 1.0.0-SNAPSHOT (using the Maven convention). If a bundle with a snapshot version is changed, it gets updated by the OSGI installer.
-
-## Start Level Handling
-
-The OSGi installer supports handling of start levels for bundles. If the provided bundle artifacts contain a start level information the bundle is installed with that start level, otherwise the default start level is used.
-Therefore, for initial provisioning to make use of start levels, the OSGi installer and the corresponding provider (see below) should run at a very low start level, probably at 1. This ensure that the bundles with a start level are started with respect to the start level.
-
-When an update of bundles is performed through the installer, by default the installer stays in the current start level and updates the bundles. However, if bundles at low start levels are affected, this might result in a lot of churn going on. Therefore, the OSGi installer can be configured to use a more intelligent start level handling:
-
-* If the framework property "sling.installer.switchstartlevel" is set to "true" and
-* there is no asynchronous install task in the list of tasks to perform, then
-* the start level is set to (the lowest level of the bundles to be updated - 1) - if the start level is lower than the level of the installer itself, the start level of the installer is used.
-* the bundles are updated/installed
-* the start level is increased to the previous level
-
-## Plugins
-
-### Factories
-
-An installer factory provides support for a specific artifact type, like a configuration or a deployment package etc.
-
-* [Configuration Installer Factory](/documentation/bundles/configuration-installer-factory.html)
-* [Subsystem Installer Factory](/documentation/bundles/subsystem-installer-factory.html)
-
-### Providers
-
-A provider provides artifacts, e.g. by scanning a directory or a database etc.
-
-* [File Installer Provider](/documentation/bundles/file-installer-provider.html)
-* [JCR Installer Provider](/documentation/bundles/jcr-installer-provider.html)
-
-## Health Check
-
-The OSGi installer provides a [Sling Health Check](/documentation/bundles/sling-health-check-tool.html) which validates that the processed OSGi installer resources have the correct state ([SLING-5888](https://issues.apache.org/jira/browse/SLING-5888)).
-By default it will only check resources with a URL prefix `jcrinstall:/apps/`, so only the resources being provided through the [JCR Installer Provider](/documentation/bundles/jcr-installer-provider.html) initially located below the repository resource `/apps/` are considered.
-The health check will fail in the following cases:
-
-### Bundles Installation Failure
-
-The checked bundle was not installed because it has been installed in a newer version through some other means (e.g. manually through the Felix Web Console or by another provider. For further details please review the OSGi Installer console at `/system/console/osgi-installer` and check for all bundles with the given symbolic name (=OSGi installers resource id) and the according URL.
-
-### Configuration Installation Failure
-
-The checked configuration was not installed because it has either been overwritten manually in the Felix Web Console or is installed by some non-checked provider (which has a higher priority). To revert 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. In case another non-checked provider has provided already a configuration you can see from where it has been installed by looking at the OSGi Installer console at `/system/console/osgi-installer` and look for all configurations with the given PID.
-
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.md b/content/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.md
deleted file mode 100644
index 5b9bc45..0000000
--- a/content/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.md
+++ /dev/null
@@ -1,99 +0,0 @@
-title=Output Rewriting Pipelines (org.apache.sling.rewriter)
-type=page
-status=published
-~~~~~~
-
-The Apache Sling Rewriter is a module for rewriting the output generated by a usual Sling rendering process. Some possible use cases include rewriting or checking all links in an HTML page, manipulating the HTML page, or using the generated output as the base for further transformation. An example of further transformation is to use XSLT to transform rendered XML to some output format like HTML or XSL:FO for generating PDF.
-
-For supporting these use cases, the rewriter uses the concept for a processor. The processor is a component that is injected through a servlet filter into the response. By implementing the *Processor* interface one is able to rewrite the whole response in one go. A more convenient way of processing the output is by using a so called pipeline; the Apache Sling rewriter basically uses the same concept as the famous Apache Cocoon: an XML based pipeline for further post processing of the output. The pipeline is based on SAX events.
-
-## SAX Pipelines
-
-The rewriter allows to configure a pipeline for post processing of the generated response. Depending on how the pipeline is assembled the rewriting process might buffer the whole output in order to do proper post processing - for example this is required if an HTML response is "transformed" to XHTML or if XSLT is used to process the response.
-
-As the pipeline is based on SAX events, there needs to be a component that generates these events and sends them through the pipeline. By default the Sling rendering scripts write to an output stream, so there is a need to parse this output and generate the SAX events.
-
-The first component in the pipeline generating the initial SAX events is called a generator. The generator gets the output from Sling, generates SAX events (XML), and streams these events into the pipeline. The counterpart of the generator is the serializer which builds the end of the pipeline. The serializer collects all incomming SAX events, transforms them into the required response by writing into output stream of the response.
-
-Between the generator and the serializer so called transformers can be placed in a chain. A transformer receives SAX events from the previous component in the pipeline and sends SAX events to the next component in the pipeline. A transformer can remove events, change events, add events or just pass on the events.
-
-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.
-
-The pipelines can be configured in the repository as a child node of */apps/APPNAME/config/rewriter* (or */libs/APPNAME/config/rewriter*). (In fact the configured search paths of the resource resolver are observed.) Each node can have the following properties:
-
-* generatorType - the type of the generator (required)
-* transformerTypes (multi value string) - the types of the transformers (optional)
-* serializerType - the type of the serializer (required)
-* paths (multi value string) - the paths this pipeline should run on (content paths)
-* contentTypes (multi value string) - the content types this pipeline should be used for (optional)
-* extensions (multi value string) - the extensions this pipeline should be used for (optional)
-* resourceTypes (multi value string) - the resource types this pipeline should be used for (optional)
-* unwrapResources (boolean) - check resource types of unwrapped resources as well (optional, since 1.1.0)
-* selectors (multi value string) - a set of selectors the pipeline should be used for (optional, since 1.1.0)
-* order (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.
-* enabled (boolean) - Is this configuration active? (default yes)
-
-As you can see from the configuration there are several possibilities to define when a pipeline should be used for a response, like paths, extensions, content types, or resource types. It is possible to specify several of them at once. In this case all conditions must be met.
-
-If a component needs a configuration, the configuration is stored in a child node which name is *{componentType}-{name}*, e.g. to configure the HTML generator (named *html-generator*), the node should have the name *generator-html-generator*. In the case that the pipeline contains the same transformer several times, the configuration child node should have the formant *{componentType}-{index}* where index is the index of the transformer starting with 1. For example if you have a pipeline with the following transformers, xslt, html-cleaner, xslt, link-checker, then the configuration nodes should be named *transformer-1* (for the first xslt), *transformer-html-cleaner*, *transformer-3* (for the second xslt), and *transformer-link-checker*.
-
-
-### Default Pipeline
-
-The default pipeline is configured for the *text/html* mime type and the *html* extensions and consists of the *html-generator* as the generator, and the *html-serializer* for generating the final response.
-As the HTML generated by Sling is not required to be valid XHTML, the HTML parser is using an HTML parser to create valid SAX events. In order to perform this, the generator needs to buffer the whole response first.
-
-## Implementing Pipeline Components
-
-Each pipeline component type has a corresponding Java interface (Generator, Transformer, and Serializer) together with a factory interface (GeneratorFactory, TransformerFactory, and SerializerFactory). When implementing such a component, both interfaces need to be implemented. The factory has only one method which creates a new instance of that type for the current request. The factory has to be registered as a service. For example if you're using the Maven SCR plugin, it looks like this:
-
-::java
-@scr.component metatype="no"
-@scr.service interface="TransformerFactory"
-@scr.property value="pipeline.type" value="validator"
-
-The factory needs to implement the according interface and should be registered as a service for this factory interface (this is a plain service and not a factory service in the OSGi sense). Each factory gets a unique name through the *pipeline.type* property. The pipeline configuration in the repository just references this unique name (like validator).
-
-## Extending the Pipeline
-With the possibilities from above, it is possible to define new pipelines and add custom components to the pipeline. However, in some cases it is required to just add a custom transformer to the existing pipeline. Therefore the rewriting can be configured with pre and post transformers that are simply added to each configured pipeline. This allows a more flexible way of customizing the pipeline without changing/adding a configuration in the repository.
-
-The approach here is nearly the same. A transformer factory needs to be implemented, but instead of giving this factory a unique name, this factory is marked as a global factory:
-
-::java
-@scr.component metatype="no"
-@scr.service interface="TransformerFactory"
-@scr.property name="pipeline.mode" value="global"
-@scr.property name="service.ranking" value="RANKING" type="Integer"
-
-*RANKING* is an integer value (don't forget the type attribute otherwise the ranking is interpreted as zero!) specifying where to add the transformer in the pipeline. If the value is less than zero the transformer is added at the beginning of the pipeline right after the generator. If the ranking is equal or higher as zero, the transformer is added at the end of the pipeline before the serializer.
-
-The *TransformerFactory* interface has just one method which returns a new transformer instance. If you plan to use other services in your transformer you might declare the references on the factory and pass in the instances into the newly created transformer.
-
-Since the transformer carries information about the current response it is not advisable to reuse the same transformer instance among multiple calls of `TransformerFactory.createTransformer`.
-
-
-## Implementing a Processor
-
-A processor must conform to the Java interface *org.apache.sling.rewriter.Processor*. It gets initializd (method *init*) with the *ProcessingContext*. This context contains all necessary information for the current request (especially the output writer to write the rewritten content to).
-The *getWriter* method should return a writer where the output is written to. When the output is written or an error occured *finished* is called.
-
-Like the pipeline components a processor is generated by a factory which has to be registered as a service factory, like this:
-
-::java
-@scr.component metatype="no"
-@scr.service interface="ProcessorFactory"
-@scr.property value="pipeline.type" value="uniqueName"
-
-## Configuring a Processor
-
-The processors can be configured in the repository as a child node of */apps/APPNAME/config/rewriter* (or libs or any configured search path). Each node can have the following properties:
-
-* processorType - the type of the processor (required) - this is the part from the scr factory information after the slash (in the example above this is *uniqueName*)
-* paths (multi value string) - the paths this processor should run on (content paths)
-* contentTypes (multi value string) - the content types this processor should be used for (optional)
-* extensions (multi value string) - the extensions this processor should be used for (optional)
-* resourceTypes (multi value string) - the resource types this processor should be used for (optional)
-* unwrapResources (boolean) - check resource types of unwrapped resources as well (optional, since 1.1.0)
-* selectors (multi value string) - a set of selectors the pipeline should be used for (optional, since 1.1.0)
-* order (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.
-* enabled (boolean) - Is this configuration active? (default yes)
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/rendering-content-default-get-servlets.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/rendering-content-default-get-servlets.md b/content/documentation/bundles/rendering-content-default-get-servlets.md
deleted file mode 100644
index ebed222..0000000
--- a/content/documentation/bundles/rendering-content-default-get-servlets.md
+++ /dev/null
@@ -1,76 +0,0 @@
-title=Rendering Content - Default GET Servlets
-type=page
-status=published
-~~~~~~
-
-[TOC]
-
-<div class="note">
-Not all features of the <b>org.apache.sling.servlets.get</b> bundle are described below - this
-page needs more work.
-</div>
-
-# Default GET and HEAD servlets
-
-Sling provides a number of default GET and HEAD servlets, in the `org.apache.sling.servlets.get` bundle.
-
-This provides useful functionality out of the box: JSON rendering of content for example, usually does
-not require custom code.
-
-This page provides an overview of these default servlets.
-
-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
-Adding a .json extension to a request triggers the default Sling GET servlet in JSON mode, unless a
-more specific servlet or script is provided for the current resource.
-
-This servlet currently supports the following selectors:
-
-* `.tidy` causes the JSON output to be formatted
-* `.harray` causes child nodes to be output as arrays instead of objects, to preserve their order (requires `org.apache.sling.servlets.get` V2.1.10)
-* A numeric value or `.infinity` as the last selector selects the desired recursion level
-
-Note that the number of elements is limited by a configurable value, see the `DefaultGetServlet` configuration for more info.
-
-## Default HTML rendering
-
-In a similar way, adding a `.html` extension to a request triggers the default Sling GET servlet in HTML
-mode. That rendering just dumps the current node values in a readable way, but it's only really useful
-for troubleshooting.
-
-## Default text rendering
-
-A basic text rendering is also provided if the request has a `.txt` extension, unless more specific servlets
-or scripts are provided.
-
-## Default XML rendering
-
-Adding a `.xml` extension triggers the default XML rendering, once again unless a more specific script or
-servlet is registered for the current resource.
-
-That XML rendering currently uses the JCR "document view" export functionality directly, so it only supports
-rendering resources that are backed by JCR nodes.
-
-## StreamRendererServlet
-
-Whenever the request carries the extension `.res` or no extension at all, the resource's input stream is spooled to the servlet response (leveraging `Resource.adaptTo(InputStream.class)`). This servlet supports conditional requests ([RFC 7232](https://tools.ietf.org/html/rfc7232)) evaluating the resource's modification date from `Resource.getResourceMetadata().getModificationTime()` and range requests ([RFC 7233](https://tools.ietf.org/html/rfc7233)).
-
-## RedirectServlet
-
-The `RedirectServlet` handles the `sling:redirect` resource type, using the `sling:target` property of the
-resource to define the redirect target, and the `sling:status` property to define the HTTP status to use (default is 302).
-
-This is not to be confused with the `sling:redirect` property used under `/etc/map`, which is described in
-[Mappings for Resource Resolution](/documentation/the-sling-engine/mappings-for-resource-resolution.html)
-
-## SlingInfoServlet
-
-The `SlingInfoServlet` provides info on the current JCR session, for requests that map to JCR nodes.
-
-It is available at `/system/sling/info.sessionInfo` by default, and supports `.json` and `.txt` extensions.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/repository-initialization.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/repository-initialization.md b/content/documentation/bundles/repository-initialization.md
deleted file mode 100644
index f501e0c..0000000
--- a/content/documentation/bundles/repository-initialization.md
+++ /dev/null
@@ -1,151 +0,0 @@
-title=
-type=page
-status=published
-~~~~~~
-
-The `SlingRepositoryInitializer` mechanism allows for running code before the `SlingRepository` service is registered.
-
-This is useful for initialization and content migration purposes.
-
-Please be aware of potential clustering and coordination issues when using this mechanism, if your environment lets several Sling instances access
-the same content repository you'll need to implement a synchronization mechanism for such operations.
-
-## SlingRepositoryInitializer
-The `SlingRepositoryInitializer` is a very simple service interface, available from version 2.4.0 of the `org.apache.sling.jcr.api` and `org.apache.sling.jcr.base` bundles.
-
-public interface SlingRepositoryInitializer {
-public void processRepository(SlingRepository repo) throws Exception;
-}
-
-Services that implement this interface are called when setting up the JCR-based `SlingRepository` service, before registering it as an OSGi service.
-
-They are called in increasing order of their `service.ranking` service property, which needs to be an `Integer` as usual.
-
-If any of them throws an Exception, the `SlingRepository` service is not registered.
-
-## The 'repoinit' Repository Initialization Language
-The `org.apache.sling.repoinit.parser` implements a mini-language meant to create paths, service users and Access Control Lists in a content repository, as
-well as registering JCR namespaces and node types.
-
-The language grammar is defined (using the JavaCC compiler-compiler, which has no runtime dependencies) in the `RepoInitGrammar.jjt` file in that module, and the automated tests provide a number of [test cases](https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases) which demonstrate various features.
-
-The companion `org.apache.sling.jcr.repoinit` module implements those operations on an Oak JCR repository, using a `SlingRepositoryInitializer`
-registered by default with a service ranking of 100. It also provides a `JcrRepoInitOpsProcessor` service to explicitly apply the output
-of the repoinit parser to a JCR repository.
-
-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.
-
-The language is self-explaining but please refer to the actual test cases for details that are guaranteed to be up to date, assuming the tests pass.
-
-create service user user1, u-ser_2
-set ACL on /libs,/apps
-allow jcr:read for user1,u-ser_2
-
-deny jcr:write for u-ser_2
-deny jcr:lockManagement for user1
-remove jcr:understand,some:other for u3
-end
-
-create service user bob_the_service
-
-set ACL on /tmp
-allow some:otherPrivilege for bob_the_service
-end
-
-# Nodetypes inside the path apply to just that path element
-create path /content/example.com(sling:Folder)
-
-# A nodetype in front is used as the default for all path elements
-create path (nt:unstructured) /var
-
-set ACL for alice, bob,fred
-# remove is currently not supported by the jcr.repoinit module
-remove * on /
-allow jcr:read on /content,/var
-deny jcr:write on /content/example.com
-deny jcr:all on / nodetypes example:Page
-end
-
-set ACL for restrictions_examples
-deny jcr:modifyProperties on /apps, /content nodetypes sling:Folder, nt:unstructured restriction(rep:itemNames,prop1,prop2)
-allow jcr:addChildNodes on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured)
-allow jcr:modifyProperties on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured) restriction(rep:itemNames,prop1,prop2)
-allow jcr:addChildNodes on /apps,/content restriction(rep:glob,/cat/*,*/cat,*cat/*)
-end
-
-# register namespace requires
-# o.a.s.repoinit.parser 1.0.4
-# and o.a.s.jcr.repoinit 1.0.2
-register namespace ( NSprefix ) uri:someURI/v1.42
-
-# register nodetypes in CND format
-# (same bundle requirements as register namespaces)
-#
-# The optional << markers are used when embedding
-# this in a Sling provisioning model, to avoid syntax errors
-#
-# The CND instructions are passed as is to the JCR
-# modules, so the full CND syntax is supported.
-#
-register nodetypes
-<<===
-<< <slingevent='http://sling.apache.org/jcr/event/1.0'>
-<<
-<< [slingevent:Event] > nt:unstructured, nt:hierarchyNode
-<< - slingevent:topic (string)
-<< - slingevent:properties (binary)
-===>>
-
-create user demoUser with password {SHA-256} dc460da4ad72c482231e28e688e01f2778a88ce31a08826899d54ef7183998b5
-
-create service user the-last-one
-
-## Providing repoinit statements from the Sling provisioning model or other URLs
-
-All bundles required for this feature need to be active before the `SlingRepository` service starts.
-
-From version 1.0.2 of the `org.apache.sling.jcr.repoinit` bundle, the `o.a.s.jcr.repoinit.RepositoryInitializer` component uses an OSGi
-configuration as shown in this example to define where to read repoinit statements:
-
-org.apache.sling.jcr.repoinit.impl.RepositoryInitializer
-references=["model:context:/resources/provisioning/model.txt","model@repoinitTwo:context:/resources/provisioning/model.txt"]
-
-This example defines two _references_ to URLs that supply repoinit statements. Their syntax is described below.
-
-By default the `RepositoryInitializer` uses the first URL shown in the above example, which points to the provisioning model that's embedded by default in the Sling Launchpad runnable jar.
-
-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
-The `slingstart-maven-plugin`, from V1.4.2 on, allows for embedding so-called "additional sections" in the Sling provisioning model by starting
-their name with a colon.
-
-At runtime this requires the `org.apache.sling.provisioning.model` bundle, version 1.4.2 or later.
-
-The `o.a.s.jcr.repoinit` bundle can use this feature to execute `repoinit` statements provided by Sling provisioning models, as in this
-provisioning model example fragment:
-
-[:repoinit]
-create path /repoinit/provisioningModelTest
-
-create service user provisioningModelUser
-
-To read repoinit statements from such an additional provisioning model section, the `RepositoryInitializer` configuration shown above uses references like
-
-model@repoinitTwo:context:/resources/provisioning/model.txt
-
-Where _model_ means "use the provisioning model format", _repoinitTwo_ is the name of the additional section to read statements from in the provisioning
-model (without the leading colon) and _context:/resources/..._ is the URL to use to retrieve the provisioning model.
-
-In this example the URL uses the _context_ scheme defined by the Sling Launchpad, but any scheme can be used provided a suitable URL handler is active.
-
-The section name in that reference is optional and defaults to _repoinit_. If it's not specified the `@` should be omitted as well.
-
-### References to URLs providing raw repoinit statements
-Using a `RepositoryInitializer` reference like in this example, with the _raw_ prefix, means that its content is passed as is to the repoinit parser:
-
-raw:classpath://some-repoinit-file.txt
-
-Which points to a `classpath:` URL to provide the raw repoinit statements in this example, but again any valid URL scheme can be used.
-
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/request-analysis.md
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/request-analysis.md b/content/documentation/bundles/request-analysis.md
deleted file mode 100644
index cde35eb..0000000
--- a/content/documentation/bundles/request-analysis.md
+++ /dev/null
@@ -1,62 +0,0 @@
-title=Request Processing Analyzer (reqanalyzer)
-type=page
-status=published
-~~~~~~
-
-[TOC]
-
-
-## Introduction
-
-Sling provides a helpful functionality to track progress of requests
-being processed: The [RequestProgressTracker](http://sling.apache.org/apidocs/sling6/org/apache/sling/api/request/RequestProgressTracker.html) which is available through the [SlingHttpServletRequest](http://sling.apache.org/apidocs/sling6/org/apache/sling/api/SlingHttpServletRequest.html#getRequestProgressTracker%28%29).
-
-This tool provides mechanims to record states of request processing and a simple mechanism to time periods of processing. By default Sling itself uses this tool to track progress through Sling like script resolution and calling scripts.
-
-Scripts and servlets called during Sling's request processing may themselves use the `RequestProgressTracker` to log their own processing.
-
-Usually the data collected by the `RequestProgressTracker` is just dropped or it may be visible for a certain number of recent requests on the *Recent Requests* page of the Web Console. When doing load tests, though, this Web Console page is of limited use because a lot more requests are handled than can be displayed in the Web Console.
-
-This is where the [Request Processing Analyzer](http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/reqanalyzer) comes in handy. When deployed as a bundle it registers as a request level servlet Filter with the Sling Main Servlet. Each request is logged in a special file (currently fixed at `${sling.home}/logs/requesttracker.txt`) with a header line provding core information on the request:
-
-* Start time stamp in ms since the Epoch
-* Request processing time in ms
-* Request Method
-* Request URL
-* Response content type (plus character encoding if available)
-* Response Status
-
-After that first line the complete data from the requests `RequestProgressTracker` is dumped.
-
-## Web Console Integration
-
-The Request Processing Analyzer is available through the Web Console in the _Sling_ category to
-
-* Download the `requesttracker.txt` file as a plain text or ZIP-ed file
-* Launch the Swing-based GUI to analyze the file
-
-The option to launch the Swing-based GUI is only available if the Sling application
-is not running in headless mode and if the Web Console is accessed on _localhost_,
-that is on the same host as the Sling instance is running.
-
-
-## Analyzing the `requesttracker.txt` file
-
-To analyze the `requesttracker.txt` file the *Request Processing Analyzer* module can also be used as a standalone Java application. Just start the module using the `java` command:
-
-$ java -jar org.apache.sling.reqanalyzer-0.0.1-SNAPSHOT.jar requesttracker.txt
-
-The command supports two command line arguments:
-
-1. The tracker file (required)
-2. The number of requests to load and display from the file. This second option is optional and may be used to limit the request information loaded to the first requests in the file
-
-After starting and parsing the file, a window is opened showing the core request information in simple table. This table can be sorted by any of the columns by clicking on the column title.
-
-![Recorded Requests](requesttracker.png)
-
-Clicking on any row opens a second window displaying the detail request progress information as recorded before with the `RequestProgressTracker`.
-
-![Details of a recorded Request](requesttracker-details.png)
-
-The size, location, and the widths of the table columns are persisted with the Java Preferences API and thus when starting the application again, these settings are preserved.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/requesttracker-details.png
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/requesttracker-details.png b/content/documentation/bundles/requesttracker-details.png
deleted file mode 100644
index 3640579..0000000
Binary files a/content/documentation/bundles/requesttracker-details.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/bundles/requesttracker.png
----------------------------------------------------------------------
diff --git a/content/documentation/bundles/requesttracker.png b/content/documentation/bundles/requesttracker.png
deleted file mode 100644
index e625a5c..0000000
Binary files a/content/documentation/bundles/requesttracker.png and /dev/null differ
[35/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/the-sling-launchpad.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/the-sling-launchpad.html b/documentation/the-sling-engine/the-sling-launchpad.html
new file mode 100644
index 0000000..c8c916b
--- /dev/null
+++ b/documentation/the-sling-engine/the-sling-launchpad.html
@@ -0,0 +1,179 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>The Sling Launchpad</h1></header><p>[TOC]</p>
+<p>This tries to explain how exactly the Sling Launchpad works, what constitutes the Sling Launchpad and how you can use the Sling Launchpad to custom create you Sling launchers. For a view behind the scenes of the Sling Launchpad Base module (the actual launcher) you might want to refer to the <a href="/documentation/development/embedding-sling.html">Embedding Sling</a> page.</p>
+<h2>Sling Home</h2>
+<p>Since Sling requires some space on the filesystem to store various files Sling has to know where this filesystem space is located.</p>
+<p>The following is a list of uses for the Sling Home directory:</p>
+<ul>
+ <li><code>sling.properties</code> -- The main configuration file used by Sling to launch the framework. It mainly contains OSGi framework configuration and initial configuration for some bundles. This file is read on each startup of <em>Launcher JAR</em>. That is, changes to this file require a restart of the <em>Launcher JAR</em>.</li>
+ <li><code>org.apache.sling.launchpad.base.jar</code> -- This is the <em>Launcher JAR</em> file used by the Standalone Application or the Web Application to start the OSGi Framework. This file is initially placed when first starting Sling and may later be updated by updating the system bundle with a new <em>Launcher JAR</em>.</li>
+ <li><code>felix</code> -- The directory into which the Apache Felix Framework places the bundles, which have been installed into the system. This does generally not need to be touched.</li>
+ <li><code>config</code> -- The directory into which the Apache Felix Configuration Admin Service stores the configurationes. Do not change any files in this directory, since changes will not generally be picked up.</li>
+ <li><code>jackrabbit</code> -- The directory in which the Apache Jackrabbit JCR repository is started ( only applicable when using Apache Jackrabbit 2.x ). This is only available for Sling Launchpad 7 or older. Amongst other things this also contains the Jackrabbit configuration file <code>repository.xml</code>. You may modify this file, but don't forget to restart the Embedded Jackrabbit Repository bundle after doing this.</li>
+ <li><code>oak</code> - The directory in which the Apache Jackrabbit Oak JCR Repository is started ( only applicable when using Apache Jackrabbit Oak with the SegmentNodeStoreBackend ). This is only available for Sling Launchpad 8 or newer.</li>
+ <li><code>logs</code> -- Contains the log files generated by Sling. By default this contains the error.log and its rotated generations.</li>
+</ul>
+<h2>Command Line Options</h2>
+<p>The Java Standalone Application supports a number of command line options, which influence the operation of the launch process.</p>
+<table>
+ <thead>
+ <tr>
+ <th>Option </th>
+ <th>Argument </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+</table>
+<p>| <code>start</code> | -- | Open a TCP/IP server socket when starting Sling. Uses option <code>-j</code> to define the local socket address. | | <code>status</code> | -- | Check whether a (remote) Sling application is running. Uses option <code>-j</code> to define the address of the Sling instance to check. Note, that the Sling application terminates after checking for the (remote) Sling status. | | <code>stop</code> | -- | Stop a (remote) Sling application is running. Uses option <code>-j</code> to define the address of the Sling instance to stop. Note, that the Sling application tesrminates after stopping the (remote) Sling instance. | | <code>-j</code> | [ host ":" ] port | The socket address to listen on for control connections (<code>start</code> or to use as the remote endpoint for the control connection (<code>status</code> and <code>stop</code>. 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 th
e port is specified localhost/127.0.0.1 is used as the host part of the address. | | <code>-c</code> | slinghome | The directory in which Sling locates its initial configuration file <code>sling.properties</code> and where files of Sling itself such as the Apache Felix bundle archive or the JCR repository files are stored. This defaults to the <code>sling</code> folder in the current working directory. This is the value which is commonly refered to as <code>${sling.home}.</code> | <code>-i</code> | launchpadhome | The launchpad directory. If not set, this is the same as <code>${sling.home}.</code> (since Sling Launchpad 2.4.0) | | <code>-l</code> | loglevel | Sets the initial loglevel as an integer in the range 0 to 4 or as one of the well known level strings <code>ERROR</code>, <code>WARN</code>, <code>INFO</code>, or <code>DEBUG</code>. This option overwrites the <code>org.apache.sling.osg.log.level</code> setting the <code>sling.properties</code> file. The default is <code>INFO</
code>. | | <code>-f</code> | logfile | The log file to use or <code>-</code> to log to standard out. This option overwrites the <code>org.apache.sling.osg.log.file</code> setting in the <code>sling.properties</code> file. The default is <code>${sling.home}/logs/error.log</code>. | | <code>-a</code> | address | The interfact to bind to (use 0.0.0.0 for any). This option overwrites the <code>org.apache.felix.http.host</code> setting in the <code>sling.properties</code> file and requires the embedded Http Service implementation to honor this property. (supported since Sling Launchpad 2.4.0) | | <code>-p</code> | port | The port to listen (default 8080) to handle HTTP requests. This option overwrites the <code>org.osgi.service.http.port</code> setting in the <code>sling.properties</code> file. | | <code>-r</code> | path | The root servlet context path for the Http Service (default is /). This option overwrites the <code>org.apache.felix.http.context_path</code> setting in the <code>slin
g.properties</code> file and requires the embedded Http Service implementation to honor this property. (since Sling Launchpad 2.4.0) | | <code>-D</code> | n=v | Sets the property <code>n</code> to the value <code>v</code>. This option can be added repeatedly setting additional properties. Any property set in this manner overwrites same named properties in the <code>sling.properties</code> file. (since Sling Launchpad 2.4.0) | | <code>-n</code> | -- | Don't install the shutdown hook. See <a href="#shutdown-hook">Shutdown Hook</a> below. (since Sling Launchpad 2.5.2) | | <code>-h</code> | -- | Prints a simple usage message listing all available command line options. |</p>
+<p>The Sling Standalone application looks for a definition of the <code>sling.home</code> setting in the following locations in order of precendence:</p>
+<ol>
+ <li>The <code>-c</code> command line option</li>
+ <li>The <code>sling.home</code> system property</li>
+ <li>The <code>SLING_HOME</code> environment variable</li>
+ <li>If none of the above resolves to a non-null value, the default value of <code>sling</code> is assumed</li>
+</ol>
+<h3>Control Port</h3>
+<p>When starting the Sling Standalone Application with the <code>start</code> command line option, a TCP control port is opened to receive simple commands which allow for stopping an instance and getting thread dumps.</p>
+<p>Currently supported commands are</p>
+<ul>
+ <li><code>stop</code> to stop the Sling instance</li>
+ <li><code>status</code> to get the instance status (OK or STOPPING)</li>
+ <li><code>threads</code> to get a thread dump</li>
+</ul>
+<p>For the Whole Truth about this functionality see the <a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/app/ControlListener.java">ControlListener class source code</a>.</p>
+<p>The interface and port is configurable with the <code>-j</code> command line option. The actual address and port used are written to the <code>${sling.home}/conf/controlport</code> file. So technically the <code>-j</code> option is not required for the <code>status</code> and <code>stop</code> operations because the port information can be read from that file.</p>
+<p>Note that using a control connection for the Sling Standalone Application presents a potential security issue. For this reason the following defaults apply:</p>
+<ul>
+ <li>The server side socket for a running Sling Standalone Application is not created by default, but only if the application is started with the <code>start</code> command line option.</li>
+ <li>The default control port configuration is <code>localhost/127.0.0.1</code> meaning that the socket is only accessible from the same system as the Sling Standalone Application is running on.</li>
+ <li>A nonce, followed by a space character, must be used as a prefix for every command sent to the control port. This nonce is generated by Sling at startup and also written to the <code>controlport</code> file mentioned above.</li>
+</ul>
+<p>For additional security, do not allow the control port to be opened on an externally visible network interface and strictly restrict access to the Sling installation folder (<code>${sling.home}</code>).</p>
+<p>Here's an example session where a Sling Standalone Application is started with the control port active:</p>
+<p>$ java -jar target/org.apache.sling.launchpad-9-SNAPSHOT.jar start 05.04.2016 11:50:45.003 *INFO * [main] Setting sling.home=sling (default) 05.04.2016 11:50:45.006 *INFO * [main] Starting Apache Sling in /foo/sling/launchpad/builder/sling ... 05.04.2016 11:50:45.012 *INFO * [Apache Sling Control Listener@/127.0.0.1:59239] Apache Sling Control Listener started ...</p>
+<p>And stopped using its control port, from another terminal:</p>
+<p>$ cat sling/conf/controlport 127.0.0.1:59239 mdsryh1k5fpcgvm7suqnckxkr7fvluzv</p>
+<p>$ telnet 127.0.0.1 59239 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'.</p>
+<p>mdsryh1k5fpcgvm7suqnckxkr7fvluzv stop</p>
+<p>OK Connection closed by foreign host.</p>
+<h3>Shutdown Hook</h3>
+<p>By default the Sling Launchpad standalone application installs a Shutdown Hook with the Java Runtime to make sure the framework is properly terminated in case of a Java termination. In some situations or setups you want to control shutdown of Sling yourselves, so Sling supports a command line option <code>-n</code> to prevent the installation of a shutdown hook.</p>
+<p>Apart from the command line option, the <code>sling.shutdown.hook</code> system property is also supported: If this property is set to <code>true</code> or is not set at all the shutdown hook is installed as expected. If the property is set to anything other than <code>true</code>, e.g. <code>false</code>, the shutdown hook is not installed.</p>
+<p>If you are embedding the Sling Launchpad application's <code>Main</code> class, the <code>sling.shutdown.hook</code> property can also be set as a member of the <code>props</code> map handed to the <code>Main</code> constructor.</p>
+<h2>Servlet Parameters</h2>
+<p>The Web Application does not require specific servlet parameters. Those which are specified are used to overwrite any properties with the same name from the <code>sling.properties</code> file. One exception to this rule is the <code>sling.home</code> parameter, which is used to set the value of the <code>sling.home</code> property. If no parameter with this name is defined the Sling home directory is derived from the context path at which the Sling Web Application is registered.</p>
+<p>The <code>sling.home</code> folders for Sling Web Applications without the <code>sling.home</code> servlet parameter are all located in the <code>sling</code> folder in the current working directory as reported by the <code>user.dir</code> system property. The name of the actual directory is derived from the Web Application Context Path by replacing all slash characters <code>/</code> by underscore characters <code>_</code>. For the root context a single underscore character <code>_</code> is used.</p>
+<p>Examples:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Servlet Context </th>
+ <th>Default <code>sling.home</code> </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><em>root</em> </td>
+ <td><code>sling/_</code> </td>
+ </tr>
+ <tr>
+ <td><code>/sling</code> </td>
+ <td><code>sling/_sling</code> </td>
+ </tr>
+ <tr>
+ <td><code>/sling/instance1</code> </td>
+ <td><code>sling/_sling/instance1</code> </td>
+ </tr>
+ </tbody>
+</table>
+<p>Starting with Launchpad Base 2.2.2 the fixed prefix <code>sling</code> is configurable with the <code>sling.home.prefix</code> system property. If this property is set the value used as the prefix.</p>
+<p>Examples: Assume the <code>sling.home.prefix</code> system property is set to <code>/var/sling</code></p>
+<table>
+ <thead>
+ <tr>
+ <th>Servlet Context </th>
+ <th>Default <code>sling.home</code> </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><em>root</em> </td>
+ <td><code>/var/sling/_</code> </td>
+ </tr>
+ <tr>
+ <td><code>/sling</code> </td>
+ <td><code>/var/sling/_sling</code> </td>
+ </tr>
+ <tr>
+ <td><code>/sling/instance1</code> </td>
+ <td><code>/var/sling/_sling/instance1</code> </td>
+ </tr>
+ </tbody>
+</table>
+<h2>sling.properties</h2>
+<p>The <code>sling.properties</code> file contains the initial setup of the Sling Application and the OSGi framework. Some of the parameters are required and should not be modified without a very good reason. Some parameters may be freely modified to your needs. Please see the inlined comment in the <code>sling.properties</code> file installed when Sling is first started.</p>
+<p>One thing to note is, that the <code>sling.properties</code> file is a simple Java Properties file with support for property references. That is, the value of properties may refer other property values by means of the well known <code>${name}</code> notation. Such property references may even be nested as in</p>
+<p>java.packages=${jre-${java.specification.version}}</p>
+<h2>Components</h2>
+<p>The Sling Launchapd consists of <em>Launchbad Base</em> project and three additional projects which ultimately create a Standalone Java Application and a Web Appliction with standard parts of Sling.</p>
+<h3>Launchpad Base</h3>
+<p>The <em>Launchpad Base</em> projects creates the following artifacts, which are required in actual setups to get a Sling application:</p>
+<ul>
+ <li>
+ <p><em>Launcher JAR</em> -- 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.</p></li>
+ <li>
+ <p><em>App JAR</em> -- The secondary artifact with classifier <em>app</em> is a minimal Standalone Java Application which may be started by simply typing</p></li>
+</ul>
+<p>$ java -jar org.apache.sling.launchpad.base-app.jar</p>
+<ul>
+ <li>
+ <p><em>Web App Archive</em> -- The secondary artifact with classifier <em>webapp</em> is a minimal Web Application, which may simply be deployed into your favirourite servlet container, provided it supports at least Servlet API 2.4.</p></li>
+ <li>
+ <p><em>Source JAR</em> -- The secondary artifact with the classifier <em>sources</em> is simple the source of the <em>Launchpad Base</em> project.</p></li>
+</ul>
+<p>To build a very basic Sling launcher, the <em>Launchpad Base</em> is actually all you need. But to really glue this together and get a usable system, some more work is required. Lets see how the additionaly projects <em>Launchpad Bundles</em>, <em>Launchpad App</em>, and <em>Launchpad WebApp</em> get to that.</p>
+<h3>Launchpad App and Launchpad WebApp</h3>
+<p>The <em>Launchpad App</em> and <em>Launchpad WebApp</em> bundles are actually projects which just glue together artifacts from the Launchpad projects. There is nothing special about them. Here's what is done:</p>
+<ul>
+ <li>Take the appropriate secondary artifact from the <em>Launchpad Base</em> project: <em>app</em> for the Standalone Java Application or <em>webapp</em> for the Web Application and unpack</li>
+ <li>Take the <em>Launchpad Base</em> primary artifact and place it under the name <code>org.apache.sling.launchpad.base.jar</code> into the <code>resources</code> folder</li>
+ <li>Copies the list of artifacts defined in the <a href="/documentation/development/slingstart.html">Provisioning model</a></li>
+ <li>Finally pack all together into a single big JAR or WAR file</li>
+</ul>
+<p>The artifacts can be configured to use different JCR repository implementations, based on the value of the <code>-Dsling.run.modes</code> property. The following run modes are available for the 8 version of the Sling Launchpad:</p>
+<ul>
+ <li><code>oak</code>: configures and starts up an Apache Jackrabbit Oak repository implementation with a SegmentNodeStore ( TarMK ) implementation</li>
+ <li><code>oak,oak_mongo</code>: configures and starts up an Apache Jackrabbit Oak repository implementation with a DocumentNodeStore implementation connected to a MongoDB database. The default configuration points to a MongoDB instance at mongodb://localhost:27017 and a database named sling.</li>
+</ul>
+<p>That's it. The resulting artifact may be directly used to launch the Standalone Java Application or may directly be deployed into any Servlet API 3.0 (or later) compliant servlet container.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/url-decomposition.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/url-decomposition.html b/documentation/the-sling-engine/url-decomposition.html
new file mode 100644
index 0000000..9534fc6
--- /dev/null
+++ b/documentation/the-sling-engine/url-decomposition.html
@@ -0,0 +1,178 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>URL decomposition</h1></header><p>[TOC]</p>
+<h1>Overview</h1>
+<p>During the <em>Resource Resolution</em> 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):</p>
+<ol>
+ <li><strong>Resource Path</strong> - For existing resources the resource path is the longest match (also considering its <a href="/documentation/the-sling-engine/mappings-for-resource-resolution.html">mappings</a>) pointing to a resource where the next character is either a dot (<code>.</code>) or it is the full request URI. Otherwise (for a path not matching any existing resource) the resource path ends at the <em>first dot (<code>.</code>)</em> in the request url. The exact logic for retrieving the resource path is implemented at <a href="https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceResolver.html#resolve-javax.servlet.http.HttpServletRequest-java.lang.String-">ResourceResolver.resolve(HttpServletRequest,String)</a>. <em>It is impossible to tell from just looking at the request URI where the resource path part ends. You have to know the underlying resource structure to know how a URL is decomposed. You cannot safely assume that the resource path w
ill always end at the first dot!</em>.</li>
+ <li><strong>Selectors</strong> - If the first character in the request URL after the resource path is a dot (<code>.</code>), the string after the dot up to but not including the last dot before the next slash character or the end of the request URL comprises the selectors. If the resource path spans the complete request URL no selectors exist. If only one dot follows the resource path before the end of the request URL or the next slash, also no selectors exist.</li>
+ <li><strong>Extension</strong> - The string after the last dot after the resource path in the request URL but before the end of the request URL or the next slash after the resource path in the request URL is the extension.</li>
+ <li><strong>Suffix</strong> - If the request URL contains a slash character after the resource path and optional selectors and extension, the path starting with the slash up to the end of the request URL is the suffix path. Otherwise, the suffix path is empty. Note, that after the resource path at least a dot must be in the URL to let Sling detect the suffix.</li>
+</ol>
+<p>Those decomposed parts can be accessed through the <code>RequestPathInfo</code> object, which is retrieved via <a href="https://sling.apache.org/apidocs/sling7/org/apache/sling/api/SlingHttpServletRequest.html#getRequestPathInfo--">SlingHttpServletRequest.getPathInfo()</a>.</p>
+<p>There's a cheat sheet in Adobe's AEM documentation at <a href="https://docs.adobe.com/docs/en/aem/6-2/develop/platform/sling-cheatsheet.html">https://docs.adobe.com/docs/en/aem/6-2/develop/platform/sling-cheatsheet.html</a> available to get you familiar with the URL decomposition of Sling.</p>
+<h1>Examples</h1>
+<p>Assume there is a Resource at <code>/a/b</code>, which has no children.</p>
+<table>
+ <thead>
+ <tr>
+ <th>URI </th>
+ <th>Resource Path </th>
+ <th>Selectors </th>
+ <th>Extension </th>
+ <th>Suffix </th>
+ <th>Resource Found </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>/a/b </td>
+ <td>/a/b </td>
+ <td>null </td>
+ <td>null </td>
+ <td>null </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b.html </td>
+ <td>/a/b </td>
+ <td>null </td>
+ <td>html </td>
+ <td>null </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b.s1.html </td>
+ <td>/a/b </td>
+ <td>s1 </td>
+ <td>html </td>
+ <td>null </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b.s1.s2.html </td>
+ <td>/a/b </td>
+ <td>s1.s2 </td>
+ <td>html </td>
+ <td>null </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b/c/d </td>
+ <td>/a/b/c/d </td>
+ <td>null </td>
+ <td>null </td>
+ <td>null </td>
+ <td>no! </td>
+ </tr>
+ <tr>
+ <td>/a/c.html/s.txt </td>
+ <td>/a/c </td>
+ <td>null </td>
+ <td>html </td>
+ <td>/s.txt </td>
+ <td>no! </td>
+ </tr>
+ <tr>
+ <td>/a/b./c/d </td>
+ <td>/a/b </td>
+ <td>null </td>
+ <td>null </td>
+ <td>/c/d </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b.html/c/d </td>
+ <td>/a/b </td>
+ <td>null </td>
+ <td>html </td>
+ <td>/c/d </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b.s1.html/c/d </td>
+ <td>/a/b </td>
+ <td>s1 </td>
+ <td>html </td>
+ <td>/c/d </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b.s1.s2.html/c/d </td>
+ <td>/a/b </td>
+ <td>s1.s2 </td>
+ <td>html </td>
+ <td>/c/d </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b/c/d.s.txt </td>
+ <td>/a/b/c/d </td>
+ <td>s </td>
+ <td>txt </td>
+ <td>null </td>
+ <td>no! </td>
+ </tr>
+ <tr>
+ <td>/a/b.html/c/d.s.txt </td>
+ <td>/a/b </td>
+ <td>null </td>
+ <td>html </td>
+ <td>/c/d.s.txt </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b.s1.html/c/d.s.txt </td>
+ <td>/a/b </td>
+ <td>s1 </td>
+ <td>html </td>
+ <td>/c/d.s.txt </td>
+ <td>yes </td>
+ </tr>
+ <tr>
+ <td>/a/b.s1.s2.html/c/d.s.txt </td>
+ <td>/a/b </td>
+ <td>s1.s2 </td>
+ <td>html </td>
+ <td>/c/d.s.txt </td>
+ <td>yes </td>
+ </tr>
+ </tbody>
+</table>
+<h1>Automated Tests</h1>
+<p>The tests at</p>
+<ul>
+ <li><a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/ResourceResolverImplTest.java">ResourceResolverImplTest</a> shows the split between resource path and the rest. Mostly in the method <code>testBasicAPIAssumptions</code>.</li>
+ <li><a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/engine/src/test/java/org/apache/sling/engine/impl/request/SlingRequestPathInfoTest.java">SlingRequestPathInfoTest</a> demonstrates the decomposition after the resource path part.</li>
+</ul>
+<p>Feel free to suggest additional tests that help clarify how this works!</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/url-to-script-resolution.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/url-to-script-resolution.html b/documentation/the-sling-engine/url-to-script-resolution.html
new file mode 100644
index 0000000..e29f836
--- /dev/null
+++ b/documentation/the-sling-engine/url-to-script-resolution.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>URL to Script Resolution</h1></header><p>[TOC]</p>
+<p>This page explains how Sling maps URLs to a script or and servlet.</p>
+<p>See also <a href="/documentation/the-sling-engine/servlets.html">Servlets and Scripts</a> which provides detailed info about how to register servlets.</p>
+<p>First of all Sling looks up the resource identified by the URL - typically a path inside the JCR repository, which is annotated by the <code>sling:resourceType</code> property which defines the resource type of that resource. Using this resource type (which is kind of a relative path, eg. "myblog/comment"), scripts or servlets are looked up. For more details about how the initial resource is identified for a specific request URL look at <a href="/documentation/the-sling-engine/url-decomposition.html">URL decomposition</a>.</p>
+<p>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).</p>
+<p>For the whole Truth about script resolution, see the <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/servlets/resolver/src/test/java/org/apache/sling/servlets/resolver/internal/helper/ScriptSelectionTest.java">ScriptSelectionTest</a> class. If you see interesting cases that are not covered there, please let us know via the Sling users mailing list.</p>
+<p>TODO: explain super types, servlet path mappings, node type resource types (<code>my:type -> my/type</code>)</p>
+<h2>Fundamental: Scripts and Servlets are equal</h2>
+<p>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.</p>
+<h2>Base: Resource Type Inheritance</h2>
+<p>While not exactly part of our discussion, resource type inheritance as implemented for <a href="https://issues.apache.org/jira/browse/SLING-278">SLING-278</a> plays a vital role in script resolution.</p>
+<p>Each resource type may have a resource super type, which may be defined in various ways. One example is having a <code>sling:resourceSuperType</code> property in the node addressed by the resource type. See <a href="http://www.mail-archive.com/sling-dev@incubator.apache.org/msg02365.html">http://www.mail-archive.com/sling-dev@incubator.apache.org/msg02365.html</a> and <a href="http://issues.apache.org/jira/browse/SLING-278">SLING-278</a> for more details.</p>
+<p>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.</p>
+<h2>Script Locations</h2>
+<p>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:</p>
+<p>{scriptPathPrefix}/{resourceTypePath}</p>
+<p>The pseudo code for iterating the locations would be something like:</p>
+<p>var type = resource.getResourceType(); while (type != null) { for (String root: resourceResolver.getSearchPath()) { String path = root + type.toPath(); findScriptsIn(path); }</p>
+<p>if (type == defaultServlet) { type = null; } else { type = getResourceSuperType(type); if (type == null) { type = defaultServlet; } } }</p>
+<h2>All requests are NOT equal</h2>
+<p>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.</p>
+<p>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.</p>
+<h2>Scripts for GET requests</h2>
+<p>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.</p>
+<p>Depending on whether request selectors are considered, a script may have two forms:</p>
+<ul>
+ <li>a. Ignoring request selectors (e.g. there are none in the request URI) <code>{resourceTypeLabel}.{requestExtension}.{scriptExtension}</code></li>
+ <li>b. Handling request selectors <code>{selectorStringPath}.{requestExtension}.{scriptExtension}</code></li>
+</ul>
+<p>The constituents of these script names are as follows:</p>
+<ul>
+ <li><code>{resourceTypeLabel}</code> - The last path segment of the path created from the resource type. This part is optional if the <code>{requestExtension}</code> is used in the script name. The resource type might either be set via the <code>sling:resourceType</code> property on the accessed node or if that property is not there its primary node type (property <code>jcr:primaryType</code>) is taken as fallback.</li>
+ <li><code>{requestExtension}</code> - The request extension. This part may be ommitted if the request extension is "html", otherwise this part is required. If this part is ommitted, the <code>{resourceTypeLabel}</code> is required in the case of ignoring the selectors.</li>
+ <li><code>{scriptExtension}</code> - The extension, e.g. "esp" or "jsp", identifying the scripting langauage used.</li>
+ <li><code>{selectorStringPath}</code> - The selector string converted to a path, along the lines of <code>selectorString.replace('.', '/')</code>. 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 <strong>first</strong> selectors in the request. This means <em>sel1/sel2.html.jsp</em> will be a candidate for the request url <em>/content/test.sel1.sel2.sel3.html</em> but not for <em>/content/test.sel3.sel1.sel2.html</em>. So the order of selectors is relevant!</li>
+</ul>
+<h2>Priority</h2>
+<p>The rules for script path priorization is defined as follows:</p>
+<ul>
+ <li>The more request selectors are matched, the better</li>
+ <li>A script including the request extension matches better than one without a request extension (for html only)</li>
+ <li>A script found earlier matches better than a script found later in the processing order. This means, that script closer to the original resource type in the resource type hierarchy is considered earlier.</li>
+</ul>
+<h2>Examples</h2>
+<p>Let's consider the following script paths for a request of a resource whose resource type is <code>slingsample</code> and the request selectors are <em>print.a4</em> and the request extension is <em>html</em>:</p>
+<ul>
+ <li>(0) GET.esp</li>
+ <li>(1) sample.esp</li>
+ <li>(2) html.esp</li>
+ <li>(3) print.esp</li>
+ <li>(4) print/a4.esp</li>
+ <li>(5) print.html.esp</li>
+ <li>(6) print/a4.html.esp</li>
+ <li>(7) a4.html.esp</li>
+ <li>(8) a4/print.html.esp</li>
+</ul>
+<p>The priority of script selection would be (starting with the best one): (6) - (4) - (5) - (3) - (2) - (1) - (0). Note that (4) is a better match than (5) because it matches more selectors even though (5) has an extension match where (4) does not. (7) is not a candidate because it does not include the first selector (print) and (8) is not a candidate because it has the wrong order of selectors.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/wrap-or-decorate-resources.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/wrap-or-decorate-resources.html b/documentation/the-sling-engine/wrap-or-decorate-resources.html
new file mode 100644
index 0000000..d0729a9
--- /dev/null
+++ b/documentation/the-sling-engine/wrap-or-decorate-resources.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Wrap or Decorate Resources</h1></header><h2>Introduction</h2>
+<p>The Sling API provides an easy way to wrap or decorate a resource before returning. Use cases for this could for example be * overwrite resource type/resource super type (for example based on the resource path) * add metadata</p>
+<p>##</p>
+<p>To add a resource decorator just register one or more services which implement the interface <code>ResourceDecorator</code></p>
+<p>:::java interface ResourceDecorator { /** Optionally decorate the supplied Resource */ Resource decorate(Resource)</p>
+<p>/** Only called if using older versions of Sling, see below */ @Deprecated Resource decorate(Resource, HttpServletRequest) }</p>
+<p>The registered decorators will be called from the resource resolver for each resource returned. If the service decorates the resource it should return the new resource (often using a <code>ResourceWrapper</code> to wrap the original Resource). If the service does not want to decorate the resource, it should return the original resource or null.</p>
+<p>Starting with version 2.1.0 of the JCR Resource bundle, the two-argument <code>decorate</code> method is not called anymore. Implementors of this interface targeting both newer and older versions of this bundle are advised to implement this method as:</p>
+<p>:::java public Resource decorate(Resource resource, HttpServletRequest request) { return this.decorate(resource); }</p>
+<p>And use some other mechanism (e.g. a <code>ThreadLocal</code>) to obtain the current request if necessary.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/tutorials-how-tos.html
----------------------------------------------------------------------
diff --git a/documentation/tutorials-how-tos.html b/documentation/tutorials-how-tos.html
new file mode 100644
index 0000000..e05f226
--- /dev/null
+++ b/documentation/tutorials-how-tos.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Tutorials & How-Tos</h1></header><p>{% for label, page in children %}* [{{ page.headers.title }}]({{ page.path }}) {% endfor %}</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/tutorials-how-tos/46-line-blog.html
----------------------------------------------------------------------
diff --git a/documentation/tutorials-how-tos/46-line-blog.html b/documentation/tutorials-how-tos/46-line-blog.html
new file mode 100644
index 0000000..009ebdb
--- /dev/null
+++ b/documentation/tutorials-how-tos/46-line-blog.html
@@ -0,0 +1,120 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>46 Line Blog</h1></header><p>This tutorial is based on the first <em>Sling Gems</em> on dev.day.com: The <a href="http://dev.day.com/microsling/content/blogs/main/sling-46-lines-blog.html">Sling gems: a blog in 46 lines of code</a>. It has slightly been adapted to fit here.</p>
+<p>In this tutorial, the SlingPostServlet and the sling.js library are brought together using 46 (no kidding: <em>fourty-six</em>) lines of code to create a simple blog (or let's say <em>bloggish</em>) application.</p>
+<p>I used this example in my <a href="http://www.slideshare.net/bdelacretaz/rapid-jcr-applications-development-with-sling-1196003">Rapid JCR application development with Apache Sling</a> presentation at ApacheCon US 09 in Oakland (slides will be available soon), and I think it's a good testimony to the power and simplicity of Sling.</p>
+<h2>Audience</h2>
+<p>Although this is a simple sample, it requires some custom settings to work. If you're just starting with Sling, <a href="/documentation/getting-started/discover-sling-in-15-minutes.html">Discover Sling in 15 minutes</a> might be a better choice.</p>
+<h2>Step 0: Start, configure and login to Sling</h2>
+<p>See <a href="/documentation/development/getting-and-building-sling.html">Getting and Building Sling</a> for how to start Sling. Start it on port 8888 for the below links to work.</p>
+<p>For this sample we need the optional <em>org.apache.sling.samples.path-based.rtp</em> bundle, if it's not present in the <a href="http://localhost:8888/system/console/bundles">OSGi console</a>, install and start it. That bundle is not released yet so you might need to build it yourself, from its <a href="http://svn.apache.org/repos/asf/sling/trunk/samples/path-based-rtp">source</a>. The bundle must then appear in the <a href="http://localhost:8888/system/console/bundles">OSGI console's list of bundles</a>, with name = <em>org.apache.sling.samples.path-based.rtp</em> and status = <em>Active</em>.</p>
+<p>Then, login using <a href="http://localhost:8888/?sling:authRequestLogin=1">http://localhost:8888/?sling:authRequestLogin=1</a> which should prompt you for a username and password, use <em>admin</em> and <em>admin</em>. Once that's done, <a href="http://localhost:8888/index.html">http://localhost:8888/index.html</a> should say <em>You are currently logged in as user <em>admin</em> to workspace <em>default</em></em>.</p>
+<h2>Step 1: Creating content</h2>
+<p>The easiest way to create content in Sling is to use an HTTP POST request, let's use a simple HTML form:</p>
+<html>
+<body>
+<h1>Sling microblog</h1>
+
+<div>
+<form method="POST">
+<input type="text" name="title" style="width:100%"/>
+
+<br/>Text:<br/>
+<textarea style="width:100%" name="text"></textarea>
+
+<br/>
+<input type="submit" value="save"/>
+<input type="hidden" name=":redirect" value="*.html"/>
+
+<!-- used by Sling when decoding request parameters -->
+<input type="hidden" name="_charset_" value="UTF-8"/>
+</form>
+</div>
+
+<!-- code of step 2 comes here -->
+</body>
+</html>
+<p>That's two input fields, a submit button and a hidden field that tells Sling what to do after the POST (in this case: redirect to the html view of the node that was just created).</p>
+<p>To test the form, start Sling and save the above script as {{/apps/blog/blog.esp}} [^esp] in the Sling repository - a WebDAV mount is the easiest way to do that. Browsing to <a href="http://localhost:8888/content/blog/*.html">http://localhost:8888/content/blog/*.html</a> [^port] should display the above form.</p>
+<p>[^esp]: ESP is Sling's server-side javascript language [^port]: This assumes your instance of Sling is running on port 8888. If that's not the case, adjust the example URLs accordingly.</p>
+<p>Input some data (using "foo" for the title, for the sake of our examples below), save the form, and Sling should display the form again, using the URL of the node that was just created.</p>
+<div class="note">
+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.
+</div>
+<p>At this point you're probably looking at an empty form with an URL ending in <em>foo</em>, if you used that for the title. Or <em>foo_0</em> or <em>foo_1</em> if other _foo_s already existed. Don't worry about not seeing your content, we'll fix that right away.</p>
+<h2>Step 2: Where's my content?</h2>
+<p>To verify that our content has been created, we can have a look at the JSON data at <a href="http://localhost:8888/content/blog/foo.tidy.json">http://localhost:8888/content/blog/foo.tidy.json</a>, which should display our new node's values:</p>
+<p>{ "jcr:primaryType": "nt:unstructured", "text": "This is the foo text", "title": "foo" }</p>
+<p>That's reassuring, but what we really want is for these values to be displayed on the editing form for our post.</p>
+<p>Thanks to the <em>sling.js</em> client library, we just need to add a <code>Sling.wizard()</code> call to our form to display those values. Let's first add a <code><head></code> element to our form to load the <em>sling.js</em> library, before the existing <code><body></code> of course:</p>
+<head>
+<script src="/system/sling.js"></script>
+</head>
+<p>And add the <code>Sling.wizard()</code> after the form, where we had the <em>code of step 2 comes here</em> comment:</p>
+<!-- code of step 2 comes here -->
+<script>Sling.wizard();</script>
+<p>Reloading the form at <code>http://localhost:8888/content/blog/*.html</code> and creating a new post should now redirect to an editable version of the post, with the form fields correctly initialized.</p>
+<p>We can now create and edit posts; let's add some navigation, using more of the <em>sling.js</em> functionality.</p>
+<h2>Step 3: Navigation</h2>
+<p>The <em>sling.js</em> library provides utilities to access and manipulate content. For our blog, we'll use the <code>getContent(path)</code> method to list the siblings of the current node.</p>
+<p>Add the following code to your script, after the <code>Sling.wizard()</code> call that was added in step 2:</p>
+<h3>Navigation</h3>
+<ul>
+<li><em><a href="/content/blog/*.html">[Create new post]</a></em></li>
+<script>
+var posts = Sling.getContent("/content/blog", 2);
+for(var i in posts) {
+document.write("<li>"
++ "<a href='/content/blog/" + i + ".html'>"
++ posts[i].title
++ "</a></li>");
+}
+</script>
+</ul>
+<p>The first link to <code>/content/blog/*</code> 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.</p>
+<p>The rest of the javascript runs client-side, as it is not embedded in <code><% %></code> code markers, calls the <code>sling.getContent</code> method to get two levels of node data below <code>/content/blog</code>, and displays links to nodes that it finds.</p>
+<p>That's a basic navigation, of course, in a real blog we'd need some paging and contextualization to cope with large numbers of posts.</p>
+<p>Nevertheless, with this addition our ESP script allows us to create, edit and navigate blog posts - not bad for 46 lines of code, including comments, whitespace and output formatting.</p>
+<h2>Step 4: Data first, structure later</h2>
+<p>You might have heard this mantra, which we apply in many areas of Sling.</p>
+<p>In this case, adding a new field to our blog posts could not be easier: just add an input field to the form, and Sling will do the rest.</p>
+<p>Adding this inside our script's <code><form></code> element, for example:</p>
+<p><br/>Author:<br/> <input type="author" name="author" style="width:100%"/></p>
+<p>Allows us to add an author name to our blog posts. No need to define anything at the repository level, as Sling is using it in unstructured mode in this case, and no need to migrate existing data, the author field of existing posts will simply be empty.</p>
+<h2>I want my ESP!</h2>
+<p>Now wait...we said we were going to create an ESP script, but our "application" is just static HTML and some client javascript at this point.</p>
+<p>That's correct - as we are using only Sling client-facing features at this point (HTTP POST and <code>sling.js</code>), we do not necessarily need to use ESP code.</p>
+<p>To keep things simple, we'll refrain from adding ESP-based features at this point, but you can of course use any ESP code in the <em>blog.esp</em> "script".</p>
+<h2>That's the power of Sling</h2>
+<p>The 46-line blog is a good example of the power of Sling. It leverages the <a href="/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html">SlingPostServlet</a>, which handles POST requests in a form-friendly way, and the <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/servlets/post/src/main/resources/system/sling.js"><code>sling.js</code></a> client library, which provides high-level functionality on the client side.</p>
+<p>///Footnotes Go Here///</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/tutorials-how-tos/getting-resources-and-properties-in-sling.html
----------------------------------------------------------------------
diff --git a/documentation/tutorials-how-tos/getting-resources-and-properties-in-sling.html b/documentation/tutorials-how-tos/getting-resources-and-properties-in-sling.html
new file mode 100644
index 0000000..308f8c9
--- /dev/null
+++ b/documentation/tutorials-how-tos/getting-resources-and-properties-in-sling.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Getting Resources and Properties in Sling</h1></header><p>The Resource is one of the central parts of Sling. Extending from JCR's Everything is Content, Sling assumes Everthing is a Resource. Thus Sling is maintaining a virtual tree of resources, which is a merger of the actual contents in the JCR Repository and resources provided by so called resource providers. By doing this Sling fits very well in the paradigm of the REST architecture.</p>
+<p>In this article we will explore a few ways to programmatically map a resource path (String) to a resource object (Resource) and its properties in Sling, from within an OSGI service, a servlet and a JSP.</p>
+<p>The whole game consists in first getting a <code>ResourceResolver</code> and then getting the <code>Resource</code> itself.</p>
+<h2>Within an OSGI Service/Compoment</h2>
+<p>You can access a resource through the <code>ResourceResolverFactory</code> service:</p>
+<h1>!java</h1>
+<p>@Reference private ResourceResolverFactory resolverFactory;</p>
+<p>public void myMethod() { try { String resourcePath = "path/to/resource"; ResourceResolver resourceResolver = resolverFactory.getAdministrativeResourceResolver(null); Resource res = resourceResolver.getResource(resourcePath); // do something with the resource // when done, close the ResourceResolver resourceResolver.close(); } catch (LoginException e) { // log the error } }</p>
+<h2>Within a Servlet</h2>
+<p>You can access the resource defined by the request URL through the <code>SlingHttpServletRequest</code>:</p>
+<h1>!java</h1>
+<p>// req is the SlingHttpServletRequest Resource res = req.getResource();</p>
+<p>You can access any resource by first accessing the <code>ResourceResolver</code>:</p>
+<h1>!java</h1>
+<p>String resourcePath = "path/to/resource"; // req is the SlingHttpServletRequest ResourceResolver resourceResolver = req.getResourceResolver(); Resource res = resourceResolver.getResource(resourcePath);</p>
+<h2>Within a JSP file</h2>
+<p>When you use the <code><sling:defineObjects></code> tag in a JSP file, you have access to a few handy objects, one of them is <code>resource</code>, the resource that is resolved from the URL. Another one is <code>resourceResolver</code>, the <code>ResourceResolver</code> defined through the <code>SlingHttpServletRequest</code>.</p>
+<p>To access a resource:</p>
+<h1>!jsp</h1>
+<p><sling:defineObjects> <% String resourcePath = "path/to/resource"; Resource res = resourceResolver.getResource(resourcePath); %></p>
+<p>If needed you can adapt a Sling Resource to a JCR Node:</p>
+<h1>!java</h1>
+<p>Node node = resource.adaptTo(Node.class);</p>
+<p>Note: <code>resource.adaptTo(Node.class)</code> may return null if the resource is not backed by a JCR node. This is particularly the case for <code>NonExistingResource</code> resources or resource provided by a non-JCR resource provider.</p>
+<h2>Accessing a Property</h2>
+<p>The <code>ValueMap</code> is an easy way to access properties of a resource. With most resources you can use <code>Adaptable.adaptTo(Class)</code> to adapt the resource to a value map:</p>
+<h1>!java</h1>
+<p>// res is the Resource ValueMap properties = res.adaptTo(ValueMap.class);</p>
+<p>You can also access the properties through the <code>ResourceUtil</code> utility class:</p>
+<h1>!java</h1>
+<p>// res is the Resource ValueMap properties = ResourceUtil.getValueMap(res);</p>
+<p>Then, to access a specific String property called <code>propName</code>:</p>
+<h1>!java</h1>
+<p>String rule = properties.get(propName, (String) null);</p>
+<p>For more details about resources and how to access them in Sling, you can refer to the <a href="/documentation/the-sling-engine/resources.html">Sling documentation about Resources</a>.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/tutorials-how-tos/how-to-manage-events-in-sling.html
----------------------------------------------------------------------
diff --git a/documentation/tutorials-how-tos/how-to-manage-events-in-sling.html b/documentation/tutorials-how-tos/how-to-manage-events-in-sling.html
new file mode 100644
index 0000000..e55ee4e
--- /dev/null
+++ b/documentation/tutorials-how-tos/how-to-manage-events-in-sling.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>How to Manage Job in Sling</h1></header><p>Apache Sling supports the execution of jobs with the guarantee of processing the job at least once. This can be seen as an extensions of the OSGi event admin, although jobs are not started or processed by OSGi events leveraging the OSGi event admin.</p>
+<p>For more details please refer to the following resources:</p>
+<ul>
+ <li>[Eventing, Jobs and Scheduling section]({{ refs.eventing-and-jobs.path }}) to get detailed information on the eventing mechanisms in Sling.</li>
+ <li>Package <a href="http://www.osgi.org/javadoc/r4v42/org/osgi/service/event/package-summary.html">org.osgi.service.event</a> of the OSGI API.</li>
+ <li>Package <a href="/apidocs/sling6/org/apache/sling/event/package-summary.html">org.apache.sling.event</a> of the Sling API.</li>
+</ul>
+<p>This page drives you through the implementation of two services that rely on the Sling job mechanism. The services implement the following use case: whenever a file is uploaded to a temporary location in your web application, the file is moved to a specific location according to its MIME type.</p>
+<h2>Introduction</h2>
+<p>You will now implement the logic to listen to files posted to <em>/tmp/dropbox</em> and to move them to the appropriate locations depending on the MIME type:</p>
+<ul>
+ <li>images (.png) are moved to <strong>/dropbox/images/</strong></li>
+ <li>music (.mp3) are moved to <strong>/dropbox/music/</strong></li>
+ <li>movies (.avi) are moved to <strong>/dropbox/movies/</strong></li>
+ <li>otherwise the files are moved to <strong>/dropbox/other/</strong></li>
+</ul>
+<p>To do that, you will implement two services. The first one, called <strong>DropBoxService</strong>:</p>
+<ul>
+ <li>Listens to specific OSGi events (Sling resource added events)</li>
+ <li>Starting a job event if a resource has been added to <strong>/tmp/dropbox</strong>.</li>
+</ul>
+<p>The second one, called <strong>DropBoxEventHandler</strong>:</p>
+<ul>
+ <li>Processes the former jobs</li>
+ <li>Moves the file according to its extension.</li>
+</ul>
+<h2>Listening to OSGI Events</h2>
+<p>To listen to OSGi events in Sling you just need to register an <strong>org.osgi.service.event.EventHandler</strong> service with an <strong>event.topics</strong> property that describes which event topics the handler is interested in.</p>
+<p>To listen to a Sling <strong>resource added</strong> events, for example, you'll set the <em>event.topics</em> property to <strong>org.apache.sling.api.SlingConstants.TOPIC_RESOURCE_ADDED</strong> in the class annotations:</p>
+<p>:::java @Property(name=org.osgi.service.event.EventConstants.EVENT_TOPIC, value=org.apache.sling.api.SlingConstants.TOPIC_RESOURCE_ADDED)</p>
+<p>The javadocs of the TOPIC_ constants in the <a href="/apidocs/sling6/org/apache/sling/api/SlingConstants.html">org.apache.sling.api.SlingConstants</a> class lists and explains the available event topics available in Sling.</p>
+<h2>Starting a job</h2>
+<p>To start a job, the <em>JobManager</em> service can be used. It needs a job topic and a payload. In our case we define our dropbox job topic and give the resource path as the payload:</p>
+<p>:::java final String resourcePath = ...; // path to the resource to handle final Map<String, Object> payload = new HashMap<String, Object>(); payload.put("resourcePath", resourcePath); // start job this.jobManager.addJob(JOB_TOPIC, payload);</p>
+<p>To receive the resource event, the service needs to implement the <strong>org.osgi.service.event.EventHandler</strong> interface and register it as an EventHandler service:</p>
+<p>:::java @Component(immediate=true) // immediate should only be used in rare cases (see below) @Service(value=EventHandler.class) public class DropBoxService implements EventHandler { ... }</p>
+<p>Usually a service should be lazy and therefore not declare itself to be immediate (in the Component annotation). However as this service is an event handler and might receive a lot of events even concurrently, it is advised to set the immediate flag to true on the component. Otherwise our event handler would be created and destroyed with every event coming in.</p>
+<p>To start the job we need a reference to the JobManager:</p>
+<p>:::java @Reference private JobManager jobManager;</p>
+<p>The job topic for dropbox job events needs to be defined:</p>
+<p>:::java /** The job topic for dropbox job events. */ public static final String JOB_TOPIC = "com/sling/eventing/dropbox/job";</p>
+<p>The <strong>org.osgi.service.event.EventHandler#handleEvent(Event event)</strong> method needs to be implemented:</p>
+<p>Its logic is as follows:</p>
+<ul>
+ <li>The OSGI event is analyzed.</li>
+ <li>If the event is a file that has been added to <em>/tmp/dropbox</em>:</li>
+ <li>An job is created with 1 property:</li>
+ <li>A property for the file path.</li>
+ <li>The job is started</li>
+</ul>
+<p>For example:</p>
+<p>:::java public void handleEvent(final Event event) { // get the resource event information final String propPath = (String) event.getProperty(SlingConstants.PROPERTY_PATH); final String propResType = (String) event.getProperty(SlingConstants.PROPERTY_RESOURCE_TYPE);</p>
+<p>// a job is started if a file is added to /tmp/dropbox if ( propPath.startsWith("/tmp/dropbox") && "nt:file".equals(propResType) ) { // create payload final Map<String, Object> payload = new HashMap<String, Object>(); payload.put("resourcePath", propPath); // start job this.jobManager.addJob(JOB_TOPIC, payload); logger.info("the dropbox job has been started for: {}", propPath); } }</p>
+<p>The complete code for the <strong>DropBoxService</strong> service is available <a href="DropBoxService.java">here</a>.</p>
+<h2>Consuming Job Events</h2>
+<p>Now that you have implemented a service that starts a job when a file is uploaded to <strong>/tmp/dropbox</strong>, you will implement the service <strong>DropBoxEventHandler</strong> that processes those jobs and moves the files to a location according to their MIME types.</p>
+<p>To process to the job that have been defined before the property <strong>job.topics</strong> needs to be set to <strong>DropBoxService.JOB_TOPIC</strong> in the class annotations:</p>
+<p>:::java @Property(name="job.topics", value=DropBoxService.JOB_TOPIC)</p>
+<p>In addition the service needs to implement the <strong>org.apache.sling.event.jobs.consumer.JobConsumer</strong> interface:</p>
+<p>:::java public class DropBoxEventHandler implements JobConsumer {</p>
+<p>Some class fields need to be defined:</p>
+<ul>
+ <li>The default logger.</li>
+ <li>The references to the ResourceResolverFactory services, which are used in the implementation.</li>
+ <li>The destination paths of the files.</li>
+</ul>
+<p>For example:</p>
+<p>:::java /** Default log. */ protected final Logger logger = LoggerFactory.getLogger(this.getClass());</p>
+<p>@Reference private ResourceResolverFactory resolverFactory;</p>
+<p>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/";</p>
+<p>The <strong>org.apache.sling.event.jobs.consumer.JobConsume#process(Job job)</strong> method needs to be implemented:</p>
+<p>Its logic is as follows:</p>
+<ul>
+ <li>The resource path is extracted from the job.</li>
+ <li>The resource is obtained from the resource path.</li>
+ <li>If the resource is a file, the destination path is defined based on the file MIME type.</li>
+ <li>The file is moved to the new location by using a JCR session (as the Sling Resource API doesn't support move atm)</li>
+</ul>
+<p>or in Java Code:</p>
+<p>:::java public JobResult process(final Job job) { ResourceResolver adminResolver = null; try { adminResolver = resolverFactory.getAdministrativeResourceResolver(null);</p>
+<p>final String resourcePath = (String) job.getProperty("resourcePath"); final String resourceName = resourcePath.substring(resourcePath.lastIndexOf("/") + 1);</p>
+<p>final Resource res = adminResolver.getResource(resourcePath); if ( res.isResourceType("nt:file") ) { final String mimeType = res.getResourceMetadata().getContentType(); String destDir; if (mimeType.equals("image/png")) { destDir = IMAGES_PATH; } else if (mimeType.equals("audio/mpeg")) { destDir = MUSIC_PATH; } else if (mimeType.equals("video/x-msvideo")) { destDir = MOVIES_PATH; } else { destDir = OTHER_PATH; } final Session adminSession = adminResolver.adaptTo(Session.class); adminSession.move(resourcePath, destDir + resourceName); adminSession.save(); logger.info("The file {} has been moved to {}", resourceName, destDir); } return JobResult.OK; } catch (final Exception e) { logger.error("Exception: " + e, e); return JobResult.FAILED; } finally { if (adminResolver != null) { adminResolver.close(); } } }</p>
+<p>The complete code for the <strong>DropBoxEventHandler</strong> service is available <a href="DropBoxEventHandler.java">here</a>.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
[37/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/dispatching-requests.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/dispatching-requests.html b/documentation/the-sling-engine/dispatching-requests.html
new file mode 100644
index 0000000..ec03f60
--- /dev/null
+++ b/documentation/the-sling-engine/dispatching-requests.html
@@ -0,0 +1,130 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Dispatching Requests</h1></header><h2>Main process</h2>
+<p>The following steps should give you an overview how a request is processed in Sling. Details can be found under provided links.</p>
+<ol>
+ <li>
+ <p>The client sends the request</p></li>
+ <li>
+ <p>This step applies only if a Servlet Container is installed and Sling is embedded: Servlet Container gets request and forwards to OSGi HttpService</p></li>
+ <li>
+ <p>OSGi HttpService looks for responsible registered Servlet or resource (see 102.4 of the OSGi compendium)</p></li>
+ <li>
+ <p>OSGi HttpService calls <code>handleSecurity</code> of the HttpContext associated with the servlet/resource. In case of Sling this calls into SlingMainServlet.handleSecurity and then into SlingAuthenticator.authenticate</p></li>
+ <li>
+ <p>SlingAuthenticator selects an authentication handler for the request and forwards the authenticate call. On success a <code>javax.jcr.Session</code> is created, the request attributes required by the HTTP Service spec are set (like <code>org.osgi.service.http.authentication.remote.user</code> and <code>org.osgi.service.http.authentication.type</code>and also the <code>javax.jcr.Session</code> which is used later is set in the request attributes. On success, continue with step 5.</p></li>
+ <li>
+ <p>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.</p></li>
+ <li>
+ <p>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 (<code>SlingMainServlet.handleSecurity</code> returns false).</p></li>
+ <li>
+ <p>After getting a response the HttpService either terminates the request (if authentication failed and <code>SlingMainServlet.handleSecurity</code> returned false) or continues by either spooling the resource or in the case of Sling calling the <code>SlingMainServlet.service</code> method.</p></li>
+ <li>
+ <p>The <code>SlingMainServlet.service</code> method is the entry point into the Sling proper. This method sets up the request:</p></li>
+</ol>
+<ul>
+ <li>Wraps the <code>HttpServletRequest</code> and the <code>HttpServletResponse</code> into the <code>SlingHttpServletRequest</code> and the <code>SlingHttpServletResponse</code></li>
+ <li>Checks if Sling is ready for processing the request (checks at the moment for an existing ResourceResolverFactory service, a ServletResolver service and a MimeTypeService)</li>
+ <li>Create the ResourceResolver based on the Session (by default creates a <code>JcrResourceResolver2</code>)</li>
+ <li>Locate the <a href="/documentation/the-sling-engine/resources.html">Resource</a> on the basis of the request by calling <code>ResourceResovler.resolve</code> through <code>RequestData.initResource</code> (see also <a href="/documentation/the-sling-engine/url-decomposition.html">URL decomposition</a>)</li>
+ <li>Locate the servlet or script (see <a href="/documentation/the-sling-engine/servlets.html">Servlets</a>) by calling <code>ServletResolver.resolveServlet</code> through <code>RequestData.initServlet</code></li>
+</ul>
+<ol>
+ <li>
+ <p>After this setup, the request level filters are called (the ones registered as <code>javax.servlet.Filter</code> with the property <code>filter.scope=request</code>, see <a href="/documentation/the-sling-engine/filters.html">Filters</a> for details). If any called filter doesn't call <code>FilterChain.doFilter</code> at the end of the <code>Filter.doFilter</code> method request processing stops here.</p></li>
+ <li>
+ <p>After having called all request level filters, the component level filters (registered with the property <code>filter.scope=component</code>, see <a href="/documentation/the-sling-engine/filters.html">Filters</a> for details) are called.</p></li>
+ <li>
+ <p>After having called the component level filters, the request servlet or script is finally called to process the request.</p></li>
+</ol>
+<h2>Include/Forward</h2>
+<p>If a servlet or script is including another resource for processing through the <code>RequestDispatcher.include</code> or <code>RequestDispatcher.forward</code> (or any JSP or feature of another scripting language which relies on one of this two methods) the following processing takes place:</p>
+<ol>
+ <li>
+ <p>Code in the processing servlet or script calls <code>RequestDispatcher.include</code> or <code>RequestDispatcher.forward</code>.</p></li>
+ <li>
+ <p>The resource is resolved though ResourceResolver.getResource (if the RequestDispatcher has not been created with a resource already)</p></li>
+ <li>
+ <p>The servlet or script to handle the resource is resolved calling the <code>ServletResolver.resolverServlet</code> method.</p></li>
+ <li>
+ <p>The component level filters (registered with the property <code>filter.scope=component</code>) are called again (see <a href="/documentation/the-sling-engine/filters.html">Filters</a> for details).</p></li>
+ <li>
+ <p>The servlet or script is called to process the request.</p></li>
+</ol>
+<p>Note that these steps are processed for every include or forward call.</p>
+<h2>Included Request Attributes</h2>
+<p>When servlet or script is called as a result of <code>RequestDispatcher.include</code> the following request attributes are set:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Attribute Name <br> Attribute Type </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>org.apache.sling.api.include.servlet</code> <br> <code>javax.servlet.Servlet</code> </td>
+ <td>The name of the request attribute containing the <code>Servlet</code> which included the servlet currently being active. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.api.include.resource</code> <br><code>org.apache.sling.api.resource.Resource</code> </td>
+ <td>The name of the request attribute containing the <code>Resource</code> underlying the <code>Servlet</code> which included the servlet currently being active. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.api.include.request_path_info</code> <br> <code>org.apache.sling.api.request.RequestPathInfo</code> </td>
+ <td>The name of the request attribute containing the <code>RequestPathInfo</code> underlying the <code>Servlet</code> which included the servlet currently being active </td>
+ </tr>
+ <tr>
+ <td><code>javax.servlet.include.request_uri</code> <br> <code>String</code> </td>
+ <td>The name of the request attribute containing the <code>HttpServletRequest.getRequestURI()</code> of the request which included the servlet currently being active underlying the <code>Servlet</code> which included the servlet currently being active.<br>**Note:** In Sling, the <code>HttpServletRequest.getRequestURI()</code> 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. </td>
+ </tr>
+ <tr>
+ <td><code>javax.servlet.include.context_path</code> <br> <code>String</code> </td>
+ <td>The name of the request attribute containing the <code>HttpServletRequest.getContextPath()</code> of the request which included the servlet currently being active underlying the <code>Servlet</code> which included the servlet currently being active.<br>**Note:** In Sling, the <code>HttpServletRequest.getContextPath()</code> 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. </td>
+ </tr>
+ <tr>
+ <td><code>javax.servlet.include.servlet_path</code> <br> <code>String</code> </td>
+ <td>The name of the request attribute containing the <code>HttpServletRequest.getServletPath()</code> of the request which included the servlet currently being active underlying the <code>Servlet</code> which included the servlet currently being active.<br>**Note:** In Sling, the <code>HttpServletRequest.getServletPath()</code> 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. </td>
+ </tr>
+ <tr>
+ <td><code>javax.servlet.include.path_info</code> <br> <code>String</code> </td>
+ <td>The name of the request attribute containing the <code>HttpServletRequest.getPathInfo()</code> of the request which included the servlet currently being active underlying the <code>Servlet</code> which included the servlet currently being active.<br>**Note:** In Sling, the <code>HttpServletRequest.getPathInfo()</code> 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.</td>
+ </tr>
+ <tr>
+ <td><code>javax.servlet.include.query_string</code> <br> <code>String</code> </td>
+ <td>The name of the request attribute containing the <code>HttpServletRequest.getQueryString()</code> of the request which included the servlet currently being active underlying the <code>Servlet</code> which included the servlet currently being active.<br>**Note:** In Sling, the <code>HttpServletRequest.getQueryString()</code> 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. </td>
+ </tr>
+ </tbody>
+</table>
+<p>Constants are defined in the <code>org.apache.sling.api.SlingConstants</code> class for these request attributes.</p>
+<p><strong>Note:</strong> These request attributes are not set if the servlet or script is called to handle the request or as a result of <code>RequestDispatcher.forward</code>.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/errorhandling.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/errorhandling.html b/documentation/the-sling-engine/errorhandling.html
new file mode 100644
index 0000000..b638b79
--- /dev/null
+++ b/documentation/the-sling-engine/errorhandling.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Errorhandling</h1></header><p>The Sling Engine includes support for handling uncaught <code>Throwable</code> as well as rendering custom HTTP status code pages. This is implemented by expecting a (single) <code>org.apache.sling.engine.servlets.ErrorHandler</code> service to which handling of uncaught <code>Throwable</code> and HTTP status responses are delegated.</p>
+<p>The Sling Servlet Resolver bundle implements this interface by providing an elaborate mechanism to find the correct error handling script or servlet using the same algorithms as are used to select the scripts or servlets to handle regular requests.</p>
+<p>This page provides more information on how error handler scripts are selected and what is provided out of the box.</p>
+<p>The <a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolver/errorhandler/ErrorHandlingTest.java">ErrorHandlingTest</a> in our integration tests suite provides working examples of various error handling scenarios.</p>
+<p>[TOC]</p>
+<h2>Resetting the Response</h2>
+<p>Errorhandler scripts and servlets are script with the current response. Before setting the status and writing to the response such handlers should do the following:</p>
+<ul>
+ <li>Check whether the response has been committed or not</li>
+ <li>If the response has not been committed:</li>
+ <li>Reset the response</li>
+ <li>Set the status code (use <code>HttpServletResponse.setStatus</code>)</li>
+ <li>Set the response content type and character encoding (provided text data is sent back)</li>
+ <li>If the response has already been committed:</li>
+ <li>Do not try to reset since this would cause an <code>IllegalStateException</code>. Also the writer may not be available.</li>
+ <li>The best that might be done in this case is just log a message at warning or error level along with information about the failure.</li>
+</ul>
+<h2>HTTP Status Codes</h2>
+<p>The Sling engine implements the <code>HttpServletResponse.sendError</code> methods by calling the <code>ErrorHandler.handleError(int status, String message, SlingHttpServletRequest request, SlingHttpServletResponse response)</code> method.</p>
+<p>The Servlet Resolver bundle implementation looks up a script to handle the status code as follows:</p>
+<ul>
+ <li>The status code is converted to a string and used as the request extension. Any request extensions, selectors or suffixes from the actual request are ignored.</li>
+ <li>The same resource type hierarchy is followed to find the script as for regular script resolution. The difference is that for error handler scripts <code>sling/servlet/errorhandler</code> is used as the implied base resource type (as opposed to <code>sling/servlet/default</code> for regular script resolution.</li>
+</ul>
+<p><strong>Examples:</strong></p>
+<ul>
+ <li>An application provider my provide a default handler for the 404/NOT FOUND status. This script might be located in <code>/libs/sling/servlet/errorhandler/404.jsp</code>.</li>
+ <li>An programmer might provide a handler for the 403/FORBIDDEN status in <code>/apps/sling/servlet/errorhandler/403.esp</code>.</li>
+</ul>
+<h2>Uncaught Throwables</h2>
+<p>To handle uncaught Throwables the simple name (<code>Class.getSimpleName()</code>) of the <code>Throwable</code> class is used as request extension. Similarly to the Java try-catch clauses the class hierarchy is supported. That is to handle an uncaught <code>FileNotFoundException</code>, the names <code>FileNotFoundException</code>, <code>IOException</code>, <code>Exception</code>, <code>Throwable</code> are checked for a Servlet and the first one found is then used. Again, the Serlvet may be a Servlet registered as an OSGi service or may be a plain script stored in the JCR repository or provided through some custom Resource provider.</p>
+<p><strong>Example:</strong> To register a catch-all handler for any uncaught Throwables you might create a script <code>/apps/sling/servlet/errorhandler/Throwable.esp</code>.</p>
+<p><strong>Note:</strong> If no script or servlet to handle an uncaught <code>Throwable</code> is registered, the default handler kicks in, which sends back a 500/INTERNAL SERVER ERROR response containing the <code>Throwable</code> and the stack trace. This response is <strong>not</strong> handled by the HTTP Status Code handling described above because the response status is sent using <code>HttpServletResponse.setStatus(int, String)</code>. To prevent this default response you have to implement a catch-all handler for the <code>Throwable</code> class as shown in the example.</p>
+<h2>Default Handler</h2>
+<p>The Sling Servlet Resolver bundle provides a default error handler servlet which is used if the algorithms described above do not resolve to a handler script or servlet. The provided error handler servlet does the following:</p>
+<ul>
+ <li>Print a descriptive message, which is the <code>javax.servlet.error.message</code> request attribute by default</li>
+ <li>Print a stacktrace if the <code>javax.servlet.error.exception</code> is set</li>
+ <li>Dump the request progress tracker</li>
+</ul>
+<p>Starting with Sling Servlet Resolver version 2.0.10 the default error handler servlet is looked up using the string <code>default</code> as the request extension and the provided default servlet is registered as <code><prefix>/sling/servlet/errorhandler/default.servlet</code> where <prefix> is the last entry in the resource resolver search path, <code>/libs</code> by default.</p>
+<p>Thus to overwrite the default error handler servlet provide a servlet or script for the <code>default</code> extension, for example <code>/apps/sling/servlet/errorhandler/default.groovy</code>.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/featureflags.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/featureflags.html b/documentation/the-sling-engine/featureflags.html
new file mode 100644
index 0000000..b34d781
--- /dev/null
+++ b/documentation/the-sling-engine/featureflags.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Feature Flags</h1></header><p>Feature Flags are used to select whether a particular feature is enabled or not. This allows to continuosly deploy new features of an application without making them globally available yet.</p>
+<p>Features may be enabled based on various contextual data:</p>
+<ul>
+ <li>Time of Day</li>
+ <li>Segmentation Data (gender, age, etc.), if available</li>
+ <li>Request Parameter</li>
+ <li>Request Header</li>
+ <li>Cookie Value</li>
+ <li>Static Configuration</li>
+</ul>
+<p>Feature flags can be provided by registering <code>org.apache.sling.featureflags.Feature</code> services. Alternatively feature flags can be provided by factory configuration with factory PID <code>org.apache.sling.featureflags.Feature</code> as follows:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Property </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>name</code> </td>
+ <td>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</td>
+ </tr>
+ <tr>
+ <td><code>description</code> </td>
+ <td>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. </td>
+ </tr>
+ <tr>
+ <td><code>enabled</code> </td>
+ <td>Boolean flag indicating whether the feature is enabled or not by this configuration</td>
+ </tr>
+ </tbody>
+</table></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/filters.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/filters.html b/documentation/the-sling-engine/filters.html
new file mode 100644
index 0000000..4832c93
--- /dev/null
+++ b/documentation/the-sling-engine/filters.html
@@ -0,0 +1,153 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Servlet Filter Support</h1></header><p>Sling supports filter processing by applying filter chains to the requests before actually dispatching to the servlet or script for processing. Filters to be used in such filter processing are plain OSGi services of type <code>javax.servlet.Filter</code> which of course means that the services implement this interface.</p>
+<div class="note">
+See <a href="https://issues.apache.org/jira/browse/SLING-1213">SLING-1213</a>,
+<a href="https://issues.apache.org/jira/browse/SLING-1734">SLING-1734</a>, and
+<a href="http://markmail.org/message/quxhm7d5s6u66crr">Registering filters with Sling</a>
+for more details. The
+<a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/filters/NoPropertyFilter.java">NoPropertyFilter</a>
+from our integration tests shows an example Sling Filter.
+</div>
+<p>For Sling to pick up a <code>javax.servlet.Filter</code> service for filter processing two service registration properties are inspected:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Property </th>
+ <th>Type </th>
+ <th>Default Value </th>
+ <th>Valid Values </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>sling.filter.scope</code> </td>
+ <td><code>String</code>, <code>String[]({{ refs..path }})</code> or <code>Vector<String></code> </td>
+ <td><code>request</code> </td>
+ <td><code>REQUEST</code>, <code>INCLUDE</code>, <code>FORWARD</code>, <code>ERROR</code>, <code>COMPONENT</code> </td>
+ <td>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. </td>
+ </tr>
+ <tr>
+ <td><code>sling.filter.pattern</code> </td>
+ <td><code>String</code></td>
+ <td>`<code>| Any</code>String<code>value | Restrict the filter to paths that match the supplied regular expression. Requires Sling Engine 2.4.0. |
+|</code>service.ranking<code>|</code>Integer<code>|</code>0<code>| Any</code>Integer<code>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</code>service.ranking<code>property value (explicitly set or default value of zero) will be ordered according to their</code>service.id` service property as described in section 5.2.5, Service Properties, of the OSGi Core Specification R 4.2. </td>
+ </tr>
+ </tbody>
+</table>
+<h2>Filter Chains</h2>
+<p>Sling maintains five filter chains: request level, component level, include filters, forward filters and error filters. Except for the component level filter these filter chains correspond to the filter <code><dispatcher></code> configurations as defined for Servlet API 2.5 web applications (see section SRV.6.2.5 Filters and the RequestDispatcher).</p>
+<p>The following table summarizes when each of the filter chains is called and what value must be defined in the <code>sling.filter.scope</code> property to have a filter added to the respective chain:</p>
+<table>
+ <thead>
+ <tr>
+ <th><code>sling.filter.scope</code> </th>
+ <th>Servlet API Correspondence </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>REQUEST</code> </td>
+ <td><code>REQUEST</code> </td>
+ <td>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 <code>COMPONENT</code> filters (if any) and the Servlet or script are called. </td>
+ </tr>
+ <tr>
+ <td><code>INCLUDE</code> </td>
+ <td><code>INCLUDE</code> </td>
+ <td>Filters are called upon calling the <code>RequestDispatcher.include</code> method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called. </td>
+ </tr>
+ <tr>
+ <td><code>FORWARD</code> </td>
+ <td><code>FORWARD</code> </td>
+ <td>Filters are called upon calling the <code>RequestDispatcher.forward</code> method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called. </td>
+ </tr>
+ <tr>
+ <td><code>ERROR</code> </td>
+ <td><code>ERROR</code> </td>
+ <td>Filters are called upon <code>HttpServletResponse.sendError</code> or any uncaught <code>Throwable</code> before resolving the error handler Servlet or script. </td>
+ </tr>
+ <tr>
+ <td><code>COMPONENT</code> </td>
+ <td><code>REQUEST,INCLUDE,FORWARD</code> </td>
+ <td>The <code>COMPONENT</code> scoped filters are present for backwards compatibility with earlier Sling Engine releases. These filters will be called among the <code>INCLUDE</code> and <code>FORWARD</code> filters upon <code>RequestDispatcher.include</code> or <code>RequestDispatcher.forward</code> as well as before calling the request level Servlet or script after the <code>REQUEST</code> filters. </td>
+ </tr>
+ </tbody>
+</table>
+<p>Note on <code>INCLUDE</code> and <code>FORWARD</code> with respect to JSP tags: These filters are also called if the respective including (e.g. <code><jsp:include></code> or <code><sling:include></code>) or forwarding (e.g. <code><jsp:forward></code> or <code><sling:forward></code>) ultimately calls the <code>RequestDispatcher</code>.</p>
+<h2>Filter Processing</h2>
+<p>Filter processing is part of the Sling request processing, which may be sketched as follows:</p>
+<ul>
+ <li><em>Request Level</em>:</li>
+ <li>Authentication</li>
+ <li>Resource Resolution</li>
+ <li>Servlet/Script Resolution</li>
+ <li>Request Level Filter Processing</li>
+</ul>
+<p>The first step of request processing is the <em>Request Level</em> processing which is concerned with resolving the resource, finding the appropriate servlet and calling into the request level filter chain. The next step is the <em>Component Level</em> processing, calling into the component level filters before finally calling the servlet or script:</p>
+<ul>
+ <li><em>Component Level</em>:</li>
+ <li>Component Level Filter Processing</li>
+ <li>Call Servlet or Script</li>
+</ul>
+<p>When a servlet or script is including or forwarding to another resource for processing through the <code>RequestDispatcher</code> (or any JSP tag or other language feature ultimately using a <code>RequestDispatcher</code>) the following <em>Dispatch</em> processing takes place:</p>
+<ul>
+ <li><em>Dispatch</em>:</li>
+ <li>Resolve the resource to dispatch to if not already defined when getting the <code>RequestDispatcher</code></li>
+ <li>Servlet/Script resolution</li>
+ <li>Call include or forward filters depending on the kind of dispatch</li>
+ <li>Call Servlet or Script</li>
+</ul>
+<p>As a consequence, request level filters will be called at most once during request processing (they may not be called at all if a filter earlier in the filter chain decides to terminate the request) while the component level, include, and forward filters may be called multiple times while processing a request.</p>
+<h2>Troubleshooting</h2>
+<p>Apart form the logs which tell you when filters are executed, two Sling plugins provide information about filters in the OSGi console.</p>
+<h3>Recent Requests plugin</h3>
+<p>The request traces provided at <code>/system/console/requests</code> contain information about filter execution, as in this example:</p>
+<p>0 (2010-09-08 15:22:38) TIMER_START{Request Processing} ... 0 (2010-09-08 15:22:38) LOG Method=GET, PathInfo=/some/path.html 3 (2010-09-08 15:22:38) LOG Applying request filters 3 (2010-09-08 15:22:38) LOG Calling filter: org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter 3 (2010-09-08 15:22:38) LOG Calling filter: org.apache.sling.portal.container.internal.request.PortalFilter 3 (2010-09-08 15:22:38) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter 3 (2010-09-08 15:22:38) LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter 3 (2010-09-08 15:22:38) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter 3 (2010-09-08 15:22:38) LOG Applying inner filters 3 (2010-09-08 15:22:38) TIMER_START{/some/script.jsp#0} ... 8 (2010-09-08 15:22:38) TIMER_END{8,Request Processing} Request Processing</p>
+<h3>Config Status plugin</h3>
+<p>The configuration status page at <code>/system/console/config</code> includes the current list of active filters in its <em>Servlet Filters</em> category, as in this example:</p>
+<p>Current Apache Sling Servlet Filter Configuration</p>
+<p>Request Filters: -2147483648 : class org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter (2547) -3000 : class org.apache.sling.portal.container.internal.request.PortalFilter (2562) -2500 : class org.apache.sling.rewriter.impl.RewriterFilter (3365) -700 : class org.apache.sling.i18n.impl.I18NFilter (2334) 0 : class org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter (2402)</p>
+<h2>Error Filters:</h2>
+<p>Include Filters:</p>
+<p>Forward Filters: 1000 : class some.package.DebugFilter (2449)</p>
+<p>Component Filters: -200 : class some.package.SomeComponentFilter (2583)</p>
+<p>The first numbers on those lines are the filter priorities, and the last number in parentheses is the OSGi service ID.</p>
+<h2>Support in Sling Engine 2.1.0</h2>
+<p>Up to and including Sling Engine 2.1.0 support for Servlet Filters has been as follows:</p>
+<ul>
+ <li>Any <code>javax.servlet.Filter</code> service is accepted as a filter for Sling unless the <code>pattern</code> property used by the <a href="http://felix.apache.org/site/apache-felix-http-service.html#ApacheFelixHTTPService-UsingtheWhiteboard">Apache Felix HttpService whiteboard support</a> is set in the service registration properties.</li>
+ <li>The <code>filter.scope</code> property is optional and supports the case-sensitive values <code>request</code> and <code>component</code>.</li>
+ <li>Filter ordering is defined by the <code>filter.order</code> property whose default value is <code>Integer.MAX_VALUE</code> where smaller values have higher priority over higher values.</li>
+</ul></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/mappings-for-resource-resolution.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/mappings-for-resource-resolution.html b/documentation/the-sling-engine/mappings-for-resource-resolution.html
new file mode 100644
index 0000000..81531ee
--- /dev/null
+++ b/documentation/the-sling-engine/mappings-for-resource-resolution.html
@@ -0,0 +1,187 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Mappings for Resource Resolution</h1></header><p>[TOC]</p>
+<h2>Configuration</h2>
+<h3>Properties</h3>
+<p>The mapping of request URLs to resources is mainly configured in a configuration tree which is (by default) located below <code>/etc/map</code>. The actual location can be configured with the <code>resource.resolver.map.location</code> property of the <code>org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl</code> configuration. That way you can even make it <a href="/documentation/bundles/sling-settings-org-apache-sling-settings.html">run mode specific</a> by having a unique path per [run mode specific OSGi configuration]({{ refs./jcr-installer-provider.path }}).</p>
+<p>When dealing with the new resource resolution we have a number of properties influencing the process:</p>
+<ul>
+ <li><code>sling:match</code> – This property when set on a node in the <code>/etc/map</code> 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: <code>/, :, [, ], *, ', ", , |</code> and any whitespace except blank space. In addition a name without a name space may not be <code>.</code> or <code>..</code> and a blank space is only allowed inside the name.</li>
+ <li><code>sling:redirect</code> – This property when set on a node in the <code>/etc/map</code> 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 <code>Location</code> response header.</li>
+ <li><code>sling:status</code> – This property defines the HTTP status code sent to the client with the <code>sling:redirect</code> 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).</li>
+ <li><code>sling:internalRedirect</code> – This property when set on a node in the <code>/etc/map</code> 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.</li>
+ <li><code>sling:alias</code> – The property may be set on any resource to indicate an alias name for the resource. For example the resource <code>/content/visitors</code> may have the <code>sling:alias</code> property set to <code>besucher</code> allowing the resource to be addressed in an URL as <code>/content/besucher</code>.</li>
+</ul>
+<h4>Limitation of <code>sling:alias</code> for Principal with a limited access</h4>
+<p>Assuming there is</p>
+<ul>
+ <li>An User named <code>testuser</code></li>
+ <li>An ACE with deny <code>jcr:all</code> in <code>/</code> for <code>everyone</code></li>
+ <li>An ACE with allow <code>jcr:read</code> in <code>/content</code> for <code>testuser</code></li>
+</ul>
+<p>If the <code>sling:alias</code> property (e.g. <code>myalias</code>) is set directly in <code>/content</code>, the User <code>testuser</code> will not be able to address the resource <code>/content</code> in an URL as <code>/myalias</code>. Instead if the <code>sling:alias</code> property is set in any resource under <code>/content</code> (e.g. <code>/content/visitors</code>) the <code>sling:alias</code> feature will work as usual.</p>
+<h3>Node Types</h3>
+<p>To ease with the definition of redirects and aliases, the following node types are defined:</p>
+<ul>
+ <li><code>sling:ResourceAlias</code> – This mixin node type defines the <code>sling:alias</code> property and may be attached to any node, which does not otherwise allow setting a property named <code>sling:alias</code></li>
+ <li><code>sling:MappingSpec</code> – This mixin node type defines the <code>sling:match</code>, <code>sling:redirect</code>, <code>sling:status</code>, and <code>sling:internaleRedirect</code> properties to define a matching and redirection inside the <code>/etc/map</code> hierarchy.</li>
+ <li><code>sling:Mapping</code> – Primary node type which may be used to easily construct entries in the <code>/etc/map</code> tree. The node type extends the <code>sling:MappingSpec</code> mixin node type to allow setting the required matching and redirection. In addition the <code>sling:Resource</code> mixin node type is extended to allow setting a resource type and the <code>nt:hierarchyNode</code> node type is extended to allow locating nodes of this node type below <code>nt:folder</code> nodes.</li>
+</ul>
+<p>Note, that these node types only help setting the properties. The implementation itself only cares for the properties and their values and not for any of these node types.</p>
+<h2>Namespace Mangling</h2>
+<p>There are systems accessing Sling, which have a hard time handling URLs containing colons – <code>:</code> – 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. <code>jcr:content</code>), a special namespace mangling feature is built into the <code>ResourceResolver.resolve</code> and <code>ResourceResolver(map)</code> methods.</p>
+<p>Namespace mangling operates such, that any namespace prefix identified in resource path to be mapped as an URL in the <code>map</code> methods is modified such that the prefix is enclosed in underscores and the colon removed.</p>
+<p><em>Example</em>: The path <code>/content/*a*sample/jcr:content/jcr:data.png</code> is modified by namespace mangling in the <code>map</code> method to get at <code>/content/*a*sample/*jcr*content/*jcr*data.png</code>.</p>
+<p>Conversely the <code>resolve</code> methods must undo such namespace mangling to get back at the resource path. This is simple done by modifying any path such that segments starting with an underscore enclosed prefix are changed by removing the underscores and adding a colon after the prefix. There is one catch, tough: Due to the way the SlingPostServlets automatically generates names, there may be cases where the actual name would be matching this mechanism. Therefore only prefixes are modified which are actually namespace prefixes.</p>
+<p><em>Example</em>: The path <code>/content/*a*sample/*jcr*content/*jcr*data.png{*</code>} <em>is modified by namespace mangling in the</em> <code>{*}resolve{*</code>} <em>method to get</em> <code>*/content/*a*sample/jcr:content/jcr:data.png{*}{</code>}*. The prefix* <code>**a{*}{</code>}<code>{</code>} is not modified because there is no registered namespace with prefix <code>a</code>. On the other hand the prefix <code>{*}jcr{*</code>} is modified because there is of course a registered namespace with prefix <code>jcr</code>.</p>
+<h2>Root Level Mappings</h2>
+<p>Root Level Mappings apply to the request at large including the scheme, host, port and uri path. To accomplish this a path is constructed from the request lik this <code>{scheme}/{host}.{port}/{uri_path}</code>. This string is then matched against mapping entries below <code>/etc/map</code> which are structured in the content analogously. The longest matching entry string is used and the replacement, that is the redirection property, is applied.</p>
+<h3>Mapping Entry Specification</h3>
+<p>Each entry in the mapping table is a regular expression, which is constructed from the resource path below <code>/etc/map</code>. If any resource along the path has a <code>sling:match</code> property, the respective value is used in the corresponding segment instead of the resource name. Only resources either having a <code>sling:redirect</code> or <code>sling:internalRedirect</code> property are used as table entries. Other resources in the tree are just used to build the mapping structure.</p>
+<p><em>Example</em></p>
+<p>Consider the following content</p>
+<p>/etc/map +-- http +-- example.com.80 | +-- sling:redirect = "http://www.example.com/" +-- www.example.com.80 | +-- sling:internalRedirect = "/example" +-- any_example.com.80 | +-- sling:match = ".+.example.com.80" | +-- sling:redirect = "http://www.example.com/" +-- localhost_any | +-- sling:match = "localhost.d*" | +-- sling:internalRedirect = "/content" | +-- cgi-bin | | +-- sling:internalRedirect = "/scripts" | +-- gateway | | +-- sling:internalRedirect = "http://gbiv.com" | +-- (stories) | +-- sling:internalRedirect = "/anecdotes/$1" +-- regexmap +-- sling:match = "$1.example.com/$2" +-- sling:internalRedirect = "/content/([^/]+)/(.*)"</p>
+<p>This would define the following mapping entries:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Regular Expression </th>
+ <th>Redirect </th>
+ <th>Internal </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>http/example.com.80 </td>
+ <td>http://www.example.com </td>
+ <td>no </td>
+ <td>Redirect all requests to the Second Level Domain to www </td>
+ </tr>
+ <tr>
+ <td>http/www.example.com.80 </td>
+ <td>/example </td>
+ <td>yes </td>
+ <td>Prefix the URI paths of the requests sent to this domain with the string <code>/example</code> </td>
+ </tr>
+ <tr>
+ <td>http/.+.example.com.80 </td>
+ <td>http://www.example.com </td>
+ <td>no </td>
+ <td>Redirect all requests to sub domains to www. The actual regular expression for the host.port segment is taken from the <code>sling:match</code> property. </td>
+ </tr>
+ <tr>
+ <td>http/localhost.d* </td>
+ <td>/content </td>
+ <td>yes </td>
+ <td>Prefix the URI paths with <code>/content</code> 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 <code>/cgi-bin</code>, <code>gateway</code> or <code>stories</code> because there are longer match entries. The actual regular expression for the host.port segment is taken from the <code>sling:match</code> property. </td>
+ </tr>
+ <tr>
+ <td>http/localhost.d*/cgi-bin </td>
+ <td>/scripts </td>
+ <td>yes </td>
+ <td>Replace the <code>/cgi-bin</code> prefix in the URI path with <code>/scripts</code> for requests to localhost, regardless of actual port the request was received on. </td>
+ </tr>
+ <tr>
+ <td>http/localhost.d*/gateway </td>
+ <td>http://gbiv.com </td>
+ <td>yes </td>
+ <td>Replace the <code>/gateway</code> prefix in the URI path with <code>http://gbiv.com</code> for requests to localhost, regardless of actual port the request was received on. </td>
+ </tr>
+ <tr>
+ <td>http/localhost.d*/(stories) </td>
+ <td>/anecdotes/stories </td>
+ <td>yes </td>
+ <td>Prepend the URI paths starting with <code>/stories</code> with <code>/anecdotes</code> for requests to localhost, regardless of actual port the request was received on. </td>
+ </tr>
+ </tbody>
+</table>
+<h3>Regular Expression Matching</h3>
+<p>As said above the mapping entries are regular expressions which are matched against path. As such these regular expressions may also contain capturing groups as shown in the example above: <code>http/localhost.d*/(stories)</code>. After matching the path against the regular expression, the replacement pattern is applied which allows references back to the capturing groups.</p>
+<p>To illustrate the matching and replacement is applied according to the following pseudo code:</p>
+<h1>!java</h1>
+<p>String path = request.getScheme + "/" + request.getServerName() + "." + request.getServerPort() + "/" + request.getPathInfo(); String result = null; for (MapEntry entry: mapEntries) { Matcher matcher = entry.pattern.matcher(path); if (matcher.find()) { StringBuffer buf = new StringBuffer(); matcher.appendReplacement(buf, entry.getRedirect()); matcher.appendTail(buf); result = buf.toString(); break; } }</p>
+<p>At the end of the loop, <code>result</code> contains the mapped path or <code>null</code> if no entry matches the request <code>path</code>.</p>
+<p><strong>NOTE:</strong> Since the entries in the <code>/etc/map</code> are also used to reverse map any resource paths to URLs, using regular expressions with wildcards in the Root Level Mappings prevent the respective entries from being used for reverse mappings. Therefor, it is strongly recommended to not use regular expression matching, unless you have a strong need.</p>
+<h4>Regular Expressions for Reverse Mappings</h4>
+<p>By default using regular expressions with wildcards will prevent to use the mapping entry for reverse mappings (see above).</p>
+<p>There is one exception though: If there is a <code>sling:internalRedirect</code> property containing a regular expression the map entry will be <em>exclusively used for reverse mappings</em> (i.e. used only for <code>ResourceResolver.map(...)</code>) (see also <a href="https://issues.apache.org/jira/browse/SLING-2560">SLING-2560</a>). The same resource may carry a <code>sling:match</code> property with wildcards and groups referring to the groups being defined in the <code>sling:internalRedirect</code> property.</p>
+<p>This example</p>
+<p>/etc/map +-- http +-- example.com.80 | +-- sling:internalRedirect = "/content/([^/]+)/home/(.*)" | +-- sling:match = "$1/index/$2"</p>
+<p>leads to the following entry being used in the reverse mapping table:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Pattern </th>
+ <th>Replacement </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>/content/([^/]+)/home/(.*) </td>
+ <td>http://example.com/$1/index/$2 </td>
+ </tr>
+ </tbody>
+</table>
+<h3>Redirection Values</h3>
+<p>The result of matching the request path and getting the redirection is either a path into the resource tree or another URL. If the result is an URL, it is converted into a path again and matched against the mapping entries. This may be taking place repeatedly until an absolute or relative path into the resource tree results.</p>
+<p>The following pseudo code summarizes this behaviour:</p>
+<h1>!java</h1>
+<p>String path = ....; String result = path; do { result = applyMapEntries(result); } while (isURL(result));</p>
+<p>As soon as the result of applying the map entries is an absolute or relative path (or no more map entries match), Root Level Mapping terminates and the next step in resource resolution, resource tree access, takes place.</p>
+<h2>Resource Tree Access</h2>
+<p>The result of Root Level Mapping is an absolute or relative path to a resource. If the path is relative – e.g. <code>myproject/docroot/sample.gif</code> – the resource resolver search path (<code>ResourceResolver.getSearchPath()</code> 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.</p>
+<p>Accessing the resource tree after applying the Root Level Mappings has four options:</p>
+<ul>
+ <li>Check whether the path addresses a so called Star Resource. A Star Resource is a resource whose path ends with or contains <code>/*</code>. Such resources are used by the <code>SlingPostServlet</code> to create new content below an existing resource. If the path after Root Level Mapping is absolute, it is made absolute by prepending the first search path entry.</li>
+ <li>Check whether the path exists in the repository. if the path is absolute, it is tried directly. Otherwise the search path entries are prepended to the path until a resource is found or the search path is exhausted without finding a resource.</li>
+ <li>Drill down the resource tree starting from the root, optionally using the search path until a resource is found.</li>
+ <li>If no resource can be resolved, a Missing Resource is returned.</li>
+</ul>
+<h3>Drilling Down the Resource Tree</h3>
+<p>Drilling down the resource tree starts at the root and for each segment in the path checks whether a child resource of the given name exists or not. If not, a child resource is looked up, which has a <code>sling:alias</code> property whose value matches the given name. If neither exists, the search is terminated and the resource cannot be resolved.</p>
+<p>The following pseudo code shows this algorithm assuming the path is absolute:</p>
+<h1>!java</h1>
+<p>String path = ...; // the absolute path Resource current = getResource("/"); String[] segments = path.split("/"); for (String segment: segments) { Resource child = getResource(current, segment); if (child == null) { Iterator<Resource> children = listChildren(current); current = null; while (children.hasNext()) { child = children.next(); if (segment.equals(getSlingAlias(child))) { current = child; break; } } if (current == null) { // fail break; } } else { current = child; } }</p>
+<h2>Rebuild The Vanity Bloom Filter</h2>
+<p><a href="https://issues.apache.org/jira/browse/SLING-4216">SLING-4216</a> introduced the usage of a bloom filter in order to resolve long startup time with many vanityPath entries. The bloom filter is handled automatically by the Sling framework. In some cases though, as changing the maximum number of vanity bloom filter bytes, a rebuild of the vanity bloom filter is needed.</p>
+<p>In order to rebuild vanity bloom filter:</p>
+<ul>
+ <li>stop Apache Sling</li>
+ <li>locate the org.apache.sling.resourceresolver bundle in the file system (e.g. $SLING_HOME/felix/bundleXX)</li>
+ <li>locate the vanityBloomFilter.txt file in the file system (e.g. $SLING_HOME/felix/bundleXX/data/vanityBloomFilter.txt)</li>
+ <li>delete the vanityBloomFilter.txt file</li>
+ <li>start Apache Sling (this might take few minutes, depending on how many vanity path entries are present)</li>
+</ul>
+<h2>Debugging Issues</h2>
+<p>Use the Felix Web Console Plugin provided at <code>/system/console/jcrresolver</code> to inspect both the mapping and the resolver map entries. Also you can check what either <code>ResourceResolver.map(...)</code> or <code>ResourceResolver.resolve(...)</code> would return for a given URL/path.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/request-listeners.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/request-listeners.html b/documentation/the-sling-engine/request-listeners.html
new file mode 100644
index 0000000..565a0c8
--- /dev/null
+++ b/documentation/the-sling-engine/request-listeners.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Request Listeners</h1></header><p>Sling provides the possibility to "listen" to a request processed by the Sling Engine (<code>SlingMainServlet</code>). To get notified you implement the service interface <code>org.apache.sling.api.request.SlingRequestListener</code>.</p>
+<h1>!java</h1>
+<p>public interface SlingRequestListener {</p>
+<p>static final String SERVICE_NAME = "org.apache.sling.api.request.SlingRequestListener";</p>
+<p>/** * This method is called from the Sling application for every * <code>EventType</code> appearing during the dispatching of * a Sling request * * @param sre the object representing the event * * @see org.apache.sling.api.request.SlingRequestEvent.EventType */ public void onEvent( SlingRequestEvent sre ); }</p>
+<p>There are no special properties to set.</p>
+<h2>Supported types of events</h2>
+<p>At the moment you will get two different types of <code>SlingRequestEvent</code>:</p>
+<table>
+ <thead>
+ <tr>
+ <th>events types (<code>SlingRequestEvent.EventType</code>) </th>
+ <th>point in time </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>EVENT_INIT </td>
+ <td>after entering the <code>service</code> method in <code>SlingMainServlet</code>. Note that this will be <strong>after</strong> the <code>handleSecurity</code> call. </td>
+ </tr>
+ <tr>
+ <td>EVENT_DESTROY </td>
+ <td>at the end of the <code>service</code> method in <code>SlingMainServlet</code> </td>
+ </tr>
+ </tbody>
+</table></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/request-parameters.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/request-parameters.html b/documentation/the-sling-engine/request-parameters.html
new file mode 100644
index 0000000..429690c
--- /dev/null
+++ b/documentation/the-sling-engine/request-parameters.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Request Parameter Handling in Sling</h1></header><p>Excerpt: Explains how Sling provides request parameters to the <code>Component</code>.</p>
+<h2>Servlet API</h2>
+<p>The Servlet API specification provides the following methods to access the parameters of a request</p>
+<table>
+ <thead>
+ <tr>
+ <th>Method </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>HttpServletRequest.getQueryString()</code> </td>
+ <td>Returns the query part of the request URL </td>
+ </tr>
+ <tr>
+ <td><code>ServletRequest.getParameter(String)</code> </td>
+ <td>Returns the (first) named parameter </td>
+ </tr>
+ <tr>
+ <td><code>ServletRequest.getParameterValues(String)</code> </td>
+ <td>Returns all parameters of that name </td>
+ </tr>
+ <tr>
+ <td><code>ServletRequest.getParameterMap()</code> </td>
+ <td>Returns all parameters as a map of <code>String[]({{ refs..path }})</code> </td>
+ </tr>
+ <tr>
+ <td><code>ServletRequest.getParameterNames()</code> </td>
+ <td>Returns an enumeration of the names of the parameters </td>
+ </tr>
+ <tr>
+ <td><code>ServletRequest.getParts()</code> </td>
+ <td>Returns all parts of the multipart request (since v3.0) </td>
+ </tr>
+ <tr>
+ <td><code>ServletRequest.getPart(String)</code> </td>
+ <td>Returns the request part with that name in case of multipart requests (since v3.0) </td>
+ </tr>
+ </tbody>
+</table>
+<p>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.</p>
+<h2>Sling API</h2>
+<p>To overcome the restrictions and to provide uniform access to request parameters the Sling API in addition to the Servlet API methods to access parameters provides an abstraction of parameters which is applicable to all parameters sent by clients, the <code>RequestParameter</code> interface. Through this interface, each parameter may be analyzed for these topics:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Type </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Raw Content </td>
+ <td>Byte array and <code>InputStream</code> representation of the request parameter values. You will generally use the <code>InputStream</code> to handle uploaded files. </td>
+ </tr>
+ <tr>
+ <td>String Content </td>
+ <td>Access the values as strings is some given encoding (see below) or by requesting the conversion using an explicit encoding. </td>
+ </tr>
+ <tr>
+ <td>File Uploads </td>
+ <td>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. </td>
+ </tr>
+ </tbody>
+</table>
+<p>To accomodate this new interface as well as to provide easy access in the traditional way the <code>SlingHttpServletRequest</code> interface adds following methods to the standard Servlet API parameter access methods:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Method </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>getRequestParameter(String)</code> </td>
+ <td>Returns the (first) named parameter as a <code>RequestParameter</code> instance </td>
+ </tr>
+ <tr>
+ <td><code>getRequestParameters(String)</code> </td>
+ <td>Returns the named parameter as an array of <code>RequestParameter</code> instances </td>
+ </tr>
+ <tr>
+ <td><code>getRequestParameterMap()</code> </td>
+ <td>Returns <code>RequestParameterMap</code> being a map of <code>RequestParameter</code> arrays indexed by parameter names </td>
+ </tr>
+ </tbody>
+</table>
+<p>All parameters are handled the same, that is all methods give access to the same parameters regardless of whether the parameters were transmitted in the request query, as part of form encoded data or as part of a <code>multipart/form-data</code> request.</p>
+<p>As of Sling Engine 2.1.0 the order or request parameters in the <code>getRequestParameterMap()</code>, <code>getParameterMap()</code>, and <code>getParameterNams()</code> is preserved as follows:</p>
+<ul>
+ <li>The first entries are the parameters reported by the servlet container. The order of these parameters amongst each other is not defined. The <code>SlingHttpServletRequest</code> provides them in the same order as provided by the servlet container.</li>
+ <li>After the servlet container provided parameters are parameters extracted from the request in case <code>multipart/form-data</code> POST requests. The order of these parameters is preserved as they are submitted in the request. This conforms to HTML 4.01 spec on forms submitted with multipart/form-data encoding: <em>A "multipart/form-data" message contains a series of parts, each representing a successful control. The parts are sent to the processing agent in the same order the corresponding controls appear in the document stream. Part boundaries should not occur in any of the data; how this is done lies outside the scope of this specification</em> (<a href="http://www.w3.org/TR/html401/interact/forms.html">17.13.4 Form content types</a>)</li>
+</ul>
+<p>Be warned: Only rely on request parameter ordering <code>multipart/form-data</code> POST requests without a query part in the request URL.</p>
+<h3>Effects of Sling on Servlet API parameter methods</h3>
+<p>From within Sling servlets/scripts you can no longer rely on the original semantics of the Servlet API methods for dealing with parameters as</p>
+<ul>
+ <li><code>ServletRequest.getParameter(String)</code></li>
+ <li><code>ServletRequest.getParameterValues(String)</code></li>
+ <li><code>ServletRequest.getParameterMap()</code></li>
+ <li><code>ServletRequest.getParameterNames()</code></li>
+ <li><code>ServletRequest.getParts()</code> and</li>
+ <li><code>ServletRequest.getPart(String)</code></li>
+</ul>
+<p>internally use the Sling parameter support (and therefore have the same implications on e.g. encoding). You should preferably use the Sling methods <code>getRequestParameter*</code> instead.</p>
+<p>Calling <code>ServletRequest.getInputStream()</code> is not supported, nor relying on some 3rd party libraries which are internally using that method like <a href="https://commons.apache.org/proper/commons-fileupload/">Apache Commons Fileupload</a>. This is because the Sling parameter support needs exclusive access to the request's input stream.</p>
+<h2>Character Encoding</h2>
+<p>Traditionally, the encoding of parameters, especially in text area input forms, has been a big issue. To solve this issue Sling introduces the following convention:</p>
+<ul>
+ <li>All forms should contain a hidden field of the name <code>_charset_</code> containing the actual encoding used to send the form from the server to the client</li>
+ <li>All forms should be sent with <em>UTF-8</em> character encoding</li>
+</ul>
+<p>The first rule is essential as it helps decoding the form input correctly. The second rule is not actually a very hard requirement but to enable support for all (or most) character sets used, using <em>UTF-8</em> is one of the best choices anyway.</p>
+<p>When Sling is now receiving a request and is asked for the parameters, the parameters are parsed in two phases: The first phase just parses the raw input data using an identity transformation of bytes to characters. This identity transformation happens to generate strings as the original data was generated with <code>ISO-8859-1</code> encoding. The second phase locates the <code>_charset_</code> parameter and fixes the character encodings of the parameters as follows:</p>
+<ul>
+ <li>All names of the parameters are re-encoded</li>
+ <li>The parameter values are re-encoded, unless the parameter value is an uploaded file. Actually the parameter (not the files of course) are internally as <code>byte[]({{ refs..path }})</code> where the conversion to a string is done on the fly (and yes, the conversion using the <code>_charset_</code> character encoding is of course cached for performance reasons)</li>
+ <li>If the parameter is an uploaded file, the file name is re-encoded on the fly when accessed</li>
+</ul>
+<div class="info">
+Up to and including Sling Engine 2.2.2 request parameters are always decoded with ISO-8859-1 encoding if the <code>_charset_</code> request parameter is missing. As of Sling Engine 2.2.4 the <code>_charset_</code> 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 <code>_charset_</code> request parameter is missing.
+To enable this functionality set the <code>sling.default.parameter.encoding</code> parameter of the Sling Main Servlet (PID <code>org.apache.sling.engine.impl.SlingMainServlet</code>) configuration (for Sling Engine < 2.3.0) or the same parameter of the Sling Request Parameter Handling (PID <code>org.apache.sling.engine.parameters</code>) configuration (for Sling Engine >= 2.3.0 ) to the desired encoding, which of course must be supported by the actual Java Platform.
+</div></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
[48/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/mime-type-support-commons-mime.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/mime-type-support-commons-mime.html b/documentation/bundles/mime-type-support-commons-mime.html
new file mode 100644
index 0000000..e893e0c
--- /dev/null
+++ b/documentation/bundles/mime-type-support-commons-mime.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>MIME Type Support (commons.mime and commons.contentdetection)</h1></header><p>Support for MIME type mappings is generally a problematic issue. On the one hand applications have to take care to stay up to date with their mappings on the other hands in web applications it is tedious to maintain the mappings. Apache Sling takes a very user and deployment friendly approadch to this problem which is described in detail on this page.</p>
+<p>[TOC]</p>
+<h2>Servlet API Support</h2>
+<p>The Servlet API specification provides a limited support for MIME type mappings :</p>
+<ul>
+ <li>Mappings may be defined in the <code>mime-mapping</code> elements of the the web application descriptor <code>web.xml</code>. Managing these mappings is presumably tedious. So servlet containers may provide reasonable defaults (or not).</li>
+ <li>The <code>ServletContext.getMimeType(String)</code> returns a MIME type for a given file name based on the extension of the filename. The mapping returned is based on the servlet container configuration as well as the web application descriptor's <code>mime-mapping</code> elements.</li>
+</ul>
+<h2>The Sling MimeTypeService</h2>
+<p>Already at the start of the Sling project we realized, that just basing the MIME type mapping decisions on the servlet container will not yield acceptable results. For this reason the Apache Sling projects provides a spezialized and configurable service supporting such mappings: The <a href="/apidocs/sling6/org/apache/sling/commons/mime/MimeTypeService.html"><code>MimeTypeService</code></a> provided by the <code>org.apache.sling.commons.mime</code> bundle.</p>
+<p>This service provides access to registered MIME types and their mappings with two methods:</p>
+<ul>
+ <li><code>getExtension(String)</code> -- given a MIME type this methods returns a primary extension. For example for the type <code>text/plain</code> this method will return <code>txt</code></li>
+ <li><code>getMimeType(String)</code> -- given a file name or just the extension) returns the mapped MIME type. For example for the filename <code>sample.html</code> (or just the extension <code>html</code>) this method will return <code>text/html</code></li>
+</ul>
+<p>Two more methods allow to programmatically add MIME type mappings:</p>
+<ul>
+ <li><code>registerMimeType(InputStream)</code> registers additional mappings from the given input stream which is expected to be formated in traditional <code>mime.types</code> file format (see below).</li>
+ <li><code>registerMimeType(String, String...)</code> registers a single mapping for the give MIME type and the respective extensions.</li>
+</ul>
+<h2>The Sling ContentAwareMimeTypeService</h2>
+<p>For content-based mime type detection (as opposed to filename-based detection), the <code>org.apache.sling.commons.contentdetection</code> bundle provides the <code>ContentAwareMimeTypeService</code>, which takes an <code>InputStream</code> that's analyzed to detect its mime type, using Apache Tika by default:</p>
+<ul>
+ <li><code>getMimeType(String filename, InputStream content)</code> -- given a filename and an <code>InputStream</code> that points to the file contents, this method first tries content-based detection using the stream, and falls back to filename-based detection if needed.</li>
+</ul>
+<h2>And More...</h2>
+<p>Besides the <code>MimeTypeService</code> provided by Apache Sling, there is actually more:</p>
+<ul>
+ <li>The <a href="/apidocs/sling6/org/apache/sling/api/SlingHttpServletRequest.html"><code>SlingHttpServletRequest</code></a> provides the <code>getResponseContentType()</code> method, which returns the preferred <em>Content-Type</em> for the response based on the requests extension. This method is implemented by Apache Sling using the <code>MimeTypeService</code>. So servlets and scripts may just call this method to set the content type of the response to the desired value.</li>
+ <li>Each Servlet (and JSP scripts) is initialized by Apache Sling with a <code>ServletContext</code> instance whose implementation of the <code>getMimeType(String)</code> effectively calls the <code>MimeTypeService.getMimeType(String)</code> method.</li>
+ <li>The Scripting support infrastructure of Sling sets the response content type on behalf of the script to the default value as returned by the <code>SlingHttpServletRequest.getResponseContentType()</code> method. At the same time the response character set is also set to <code>UTF-8</code> for <em>text</em> content types.</li>
+</ul>
+<h2>Configuring MIME Type Mappings</h2>
+<p>The implementation of the <code>MimeTypeService</code> in the Apache Sling MIME type mapping support (<code>org.apache.sling.commons.mime</code>) bundle supports a numnber of ways to configure and extend the set of MIME type mappings:</p>
+<ul>
+ <li>Default configuration. The default configuration is based on the <a href="http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types"><code>mime.types</code></a> file maintained by Roy Fielding for the Apache httpd project and some extensions by Apache Sling.</li>
+ <li>Bundle provided mappings. Bundles registered in the OSGi framework may contain MIME type mappings files <code>META-INF/mime.types</code> which are loaded automatically by the Apache Sling MIME type mapping support bundle.</li>
+ <li>Configuration. Mappings may be supplied by configuration of the <code>MimeTypeService</code> implementation as the multi-value string property <code>mime.types</code>. Each value of the property corresponds to a line in a MIME type configuration file (see below for the format).</li>
+ <li>Registered Mappings. Mappings may be registered with the <code>MimeTypeService.registerMapping</code> methods.</li>
+ <li><a href="/apidocs/sling6/org/apache/sling/commons/mime/MimeTypeProvider.html"><code>MimeTypeProvider</code></a>. Additional mappings may be provided by service implementing the <code>MimeTypeProvider</code> interface. The <code>MimeTypeService</code> implementation will call these services in turn until a service returns a mapping provided there is no static configuration to responde to the mapping request.</li>
+</ul>
+<p>Please note, that existing mappings cannot be overwritten later. Thus mappings have an inherent priority:</p>
+<ol>
+ <li>Mappings provided by the Apache httpd project's <code>mime.types</code> file</li>
+ <li>Extensions by the Apache Sling MIME type mapping support bundle</li>
+ <li>Bundles providing a <code>META-INF/mime.types</code> file in the order of their bundle-id (or startup order if started after the MIME type mapping support bundle)</li>
+ <li>OSGi Configuration. Note that bundles started <em>after</em> the MIME type mapping support bundle may not overwrite mappings provided by the OSGi configuration. This may sounds like a problem, but in reality this should genrally not matter</li>
+ <li>Mappings registered calling the <code>MimeTypeService.registerMimeType</code> method</li>
+ <li>Mappings provided by <code>MimeTypeProvider</code> services</li>
+</ol>
+<h2>MIME Type Mapping File Format</h2>
+<p>The file format for MIME type mapping files is rather simple:</p>
+<ul>
+ <li>The files are assumed to be encoded with the <em>ISO-8859-1</em> (aka Latin 1) character encoding</li>
+ <li>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.
+</li>
+ <li>Empty lines and lines starting with a hash sign (<code>#</code>) are ignored</li>
+ <li>Data lines consist of space (any whitespace matching the <code>s</code> regular expression) separated values. The first value is the MIME type name and the remaining values defining mappings to file name extensions. The first listed file name extension is considered the <em>default mapping</em> and is returned by the <code>MimeTypeService.getExtension(String)</code> method. Entry lines consisting of just a mime type but no extensions are also (currently) ignored.</li>
+</ul>
+<p>THe data line format described here also applies to configuration provided by the values of the <code>mime.types</code> property of the MIME type service configuration. The file format description applies to all <code>META-INF/mime.types</code> files provided by the bundles as well as input streams supplied to the <code>MimeTypeService.registerMimeType(InputStream)</code> method.</p>
+<h2>Web Console Plugin</h2>
+<p>The Apache Sling MIME type mapping support bundle implements a plugin for the Apache Felix Web Console which may be consulted to investigate the current contents of the MIME type mapping tables.</p>
+<p><img src="/documentation/bundles/mimetypes.png" alt="Mime Types Web Console Plugin" /></p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/models.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/models.html b/documentation/bundles/models.html
new file mode 100644
index 0000000..9245ecd
--- /dev/null
+++ b/documentation/bundles/models.html
@@ -0,0 +1,411 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Sling Models</h1></header><p>[TOC]</p>
+<p>Many Sling projects want to be able to create model objects - POJOs which are automatically mapped from Sling objects, typically resources, but also request objects. Sometimes these POJOs need OSGi services as well.</p>
+<h1>Design Goals</h1>
+<ul>
+ <li>Entirely annotation driven. "Pure" POJOs.</li>
+ <li>Use standard annotations where possible.</li>
+ <li>Pluggable</li>
+ <li>OOTB, support resource properties (via ValueMap), SlingBindings, OSGi services, request attributes</li>
+ <li>Adapt multiple objects - minimal required Resource and SlingHttpServletRequest</li>
+ <li>Client doesn't know/care that these objects are different than any other adapter factory</li>
+ <li>Support both classes and interfaces.</li>
+ <li>Work with existing Sling infrastructure (i.e. not require changes to other bundles).</li>
+</ul>
+<h1>Basic Usage</h1>
+<p>In the simplest case, the class is annotated with <code>@Model</code> and the adaptable class. Fields which need to be injected are annotated with <code>@Inject</code>:</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel {</p>
+<p>@Inject private String propertyName; }</p>
+<p>In this case, a property named "propertyName" will be looked up from the Resource (after first adapting it to a <code>ValueMap</code>) and it is injected.</p>
+<p>For an interface, it is similar:</p>
+<p>::java @Model(adaptables=Resource.class) public interface MyModel {</p>
+<p>@Inject String getPropertyName(); }</p>
+<p>Constructor injection is also supported (as of Sling Models 1.1.0):</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel { @Inject public MyModel(@Named("propertyName") String propertyName) { // constructor code } }</p>
+<p>Because the name of a constructor argument parameter cannot be detected via the Java Reflection API a <code>@Named</code> annotation is mandatory for injectors that require a name for resolving the injection.</p>
+<p>In order for these classes to be picked up, there is a header which must be added to the bundle's manifest:</p>
+<p><Sling-Model-Packages> org.apache.sling.models.it.models </Sling-Model-Packages></p>
+<p>This header must contain all packages which contain model classes or interfaces. However, subpackages need not be listed individually, e.g. the header above will also pick up model classes in <code>org.apache.sling.models.it.models.sub</code>. Multiple packages can be listed in a comma-separated list (any whitespace will be removed):</p>
+<p><Sling-Model-Packages> org.apache.sling.models.it.models, org.apache.sling.other.models </Sling-Model-Packages></p>
+<p>Alternatively it is possible to list all classes individually that are Sling Models classes via the <code>Sling-Model-Classes</code> header.</p>
+<p>If you use the Sling Models bnd plugin all required bundle headers are generated automatically at build time (see chapter 'Registration of Sling Models classes via bnd plugin' below).</p>
+<h1>Client Code</h1>
+<h2>adaptTo()</h2>
+<p>Client code doesn't need to be aware that Sling Models is being used. It just uses the Sling Adapter framework:</p>
+<p>::java MyModel model = resource.adaptTo(MyModel.class)</p>
+<p>Or</p>
+<p>::jsp <sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.models.it.models.MyModel" var="model"/></p>
+<p>Or</p>
+<p>::jsp ${sling:adaptTo(resource, 'org.apache.sling.models.it.models.MyModel')}</p>
+<p>As with other AdapterFactories, if the adaptation can't be made for any reason, <code>adaptTo()</code> returns null.</p>
+<h2>ModelFactory (since 1.2.0)</h2>
+<p><em>See also <a href="https://issues.apache.org/jira/browse/SLING-3709">SLING-3709</a></em></p>
+<p>Since Sling Models 1.2.0 there is another way of instantiating models. The OSGi service <code>ModelFactory</code> provides a method for instantiating a model that throws exceptions. This is not allowed by the Javadoc contract of the adaptTo method. That way <code>null</code> checks are not necessary and it is easier to see why instantiation of the model failed.</p>
+<p>::java try { MyModel model = modelFactory.createModel(object, MyModel.class); } catch (Exception e) { // give out error message that the model could not be instantiated. // The exception contains further information. // See the javadoc of the ModelFactory for which Exception can be expected here }</p>
+<p>In addition <code>ModelFactory</code> provides methods for checking whether a given class is a model at all (having the model annotation) or whether a class can be adapted from a given adaptable.</p>
+<h1>Other Options</h1>
+<h2>Names</h2>
+<p>If the field or method name doesn't exactly match the property name, <code>@Named</code> can be used:</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel {</p>
+<p>@Inject @Named("secondPropertyName") private String otherName; }</p>
+<h2>Optional and Required</h2>
+<p><code>@Inject</code>ed fields/methods are assumed to be required. To mark them as optional, use <code>@Optional</code>:</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel {</p>
+<p>@Inject @Optional private String otherName; }</p>
+<p>If a majority of <code>@Inject</code>ed fields/methods are optional, it is possible (since Sling Models API 1.0.2/Impl 1.0.6) to change the default injection strategy by using adding <code>defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL</code> to the <code>@Model</code> annotation:</p>
+<p>::java @Model(adaptables=Resource.class, defaultInjectionStrategy=DefaultInjectionStrategy.OPTIONAL) public class MyModel {</p>
+<p>@Inject private String otherName; }</p>
+<p>To still mark some fields/methods as being mandatory while relying on <code>defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL</code> for all other fields, the annotation <code>@Required</code> can be used.</p>
+<p><code>@Optional</code> annotations are only evaluated when using the <code>defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED</code> (which is the default), <code>@Required</code> annotations only if using <code>defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL</code>.</p>
+<h2>Defaults</h2>
+<p>A default value can be provided (for Strings & primitives):</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel {</p>
+<p>@Inject @Default(values="defaultValue") private String name; }</p>
+<p>Defaults can also be arrays:</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel {</p>
+<p>@Inject @Default(intValues={1,2,3,4}) private int[] integers; }</p>
+<p>OSGi services can be injected:</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel {</p>
+<p>@Inject private ResourceResolverFactory resourceResolverFactory; }</p>
+<p>In this case, the name is not used -- only the class name.</p>
+<h2>Collections</h2>
+<p>Lists and arrays are supported by some injectors. For the details look at the table given in <a href="#available-injectors">Available Injectors</a>:</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel {</p>
+<p>@Inject private List<Servlet> servlets; }</p>
+<p>List injection for <em>child resources</em> works by injecting grand child resources (since Sling Models Impl 1.0.6). For example, the class</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel {</p>
+<p>@Inject private List<Resource> addresses; }</p>
+<p>Is suitable for a resource structure such as:</p>
+<p>+- resource (being adapted) | +- addresses | +- address1 | +- address2</p>
+<p>In this case, the <code>addresses</code> <code>List</code> will contain <code>address1</code> and <code>address2</code>.</p>
+<h2>OSGi Service Filters</h2>
+<p>OSGi injection can be filtered:</p>
+<p>::java @Model(adaptables=SlingHttpServletRequest.class) public class MyModel {</p>
+<p>@Inject private PrintWriter out;</p>
+<p>@Inject @Named("log") private Logger logger;</p>
+<p>@Inject @Filter("(paths=/bin/something)") private List<Servlet> servlets; }</p>
+<h2>PostConstruct Methods</h2>
+<p>The <code>@PostConstruct</code> annotation can be used to add methods which are invoked upon completion of all injections:</p>
+<p>::java @Model(adaptables=SlingHttpServletRequest.class) public class MyModel {</p>
+<p>@Inject private PrintWriter out;</p>
+<p>@Inject @Named("log") private Logger logger;</p>
+<p>@PostConstruct protected void sayHello() { logger.info("hello"); } }</p>
+<p><code>@PostConstruct</code> methods in a super class will be invoked first.</p>
+<h2>Via</h2>
+<p>If the injection should be based on a JavaBean property of the adaptable, you can indicate this using the <code>@Via</code> annotation:</p>
+<p>::java @Model(adaptables=SlingHttpServletRequest.class) public interface MyModel {</p>
+<p>// will return request.getResource().adaptTo(ValueMap.class).get("propertyName", String.class) @Inject @Via("resource") String getPropertyName(); }</p>
+<h2>Source</h2>
+<p>If there is ambiguity where a given injection could be handled by more than one injector, the <code>@Source</code> annotation can be used to define which injector is responsible:</p>
+<p>::java @Model(adaptables=SlingHttpServletRequest.class) public interface MyModel {</p>
+<p>// Ensure that "resource" is retrived from the bindings, not a request attribute @Inject @Source("script-bindings") Resource getResource(); }</p>
+<h2>Adaptations</h2>
+<p>If the injected object does not match the desired type and the object implements the <code>Adaptable</code> interface, Sling Models will try to adapt it. This provides the ability to create rich object graphs. For example:</p>
+<p>::java @Model(adaptables=Resource.class) public interface MyModel {</p>
+<p>@Inject ImageModel getImage(); }</p>
+<p>@Model(adaptables=Resource.class) public interface ImageModel {</p>
+<p>@Inject String getPath(); }</p>
+<p>When a resource is adapted to <code>MyModel</code>, a child resource named <code>image</code> is automatically adapted to an instance of <code>ImageModel</code>.</p>
+<p>Constructor injection is supported for the adaptable itself. For example:</p>
+<p>::java @Model(adaptables=Resource.class) public class MyModel {</p>
+<p>public MyModel(Resource resource) { this.resource = resource; }</p>
+<p>private final Resource resource;</p>
+<p>@Inject private String propertyName; }</p>
+<h2>Sling Validation (since 1.2.0)</h2>
+<a name="validation">*See also [SLING-4161](https://issues.apache.org/jira/browse/SLING-4161)*</a>
+<p>You can use the attribute <code>validation</code> on the Model annotation to call a validation service on the resource being used by the Sling model. That attribute supports three different values:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Value </th>
+ <th>Description </th>
+ <th>Invalid validation model </th>
+ <th>No validation model found </th>
+ <th>Resource invalid according to model</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>DISABLED</code> (default) </td>
+ <td>don't validate the resource bound to the Model </td>
+ <td>Model instantiated </td>
+ <td>Model instantiated </td>
+ <td>Model instantiated</td>
+ </tr>
+ <tr>
+ <td><code>REQUIRED</code> </td>
+ <td>enforce validation of the resource bound to the Model </td>
+ <td>Model not instantiated </td>
+ <td>Model not instantiated </td>
+ <td>Model not instantiated</td>
+ </tr>
+ <tr>
+ <td><code>OPTIONAL</code> </td>
+ <td>validate the resource bound to the Model (if a validation model is found) </td>
+ <td>Model not instantiated </td>
+ <td>Model instantiated </td>
+ <td>Model not instantiated</td>
+ </tr>
+ </tbody>
+</table>
+<p>In case the model is not instantiated an appropriate error message is logged (if <code>adaptTo()</code> is used) or an appropriate exception is thrown (if <code>ModelFactory.createModel()</code> is used).</p>
+<p>The only implementation for this Sling Models validation service is leveraging <a href="/documentation/bundles/validation.html">Sling Validation</a> and is located in the bundle <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/validation-impl/">org.apache.sling.models.validation-impl</a>. Validation is only working on models which are adapted from either <code>Resource</code> or <code>SlingHttpServletRequest</code> and if the Sling Validation Bundle is deployed.</p>
+<h1>Custom Injectors</h1>
+<p>To create a custom injector, simply implement the <code>org.apache.sling.models.spi.Injector</code> interface and register your implementation with the OSGi service registry. Please refer to the standard injectors in <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/injectors/">Subversion</a> for examples.</p>
+<p>Injectors are invoked in order of their service ranking, from lowest to highest. See the table below for the rankings of the standard injectors.</p>
+<h1>Annotation Reference</h1>
+<p><code>@Model</code> : declares a model class or interface</p>
+<p><code>@Inject</code> : marks a field or method as injectable</p>
+<p><code>@Named</code> : declare a name for the injection (otherwise, defaults based on field or method name).</p>
+<p><code>@Optional</code> : marks a field or method injection as optional</p>
+<p><code>@Source</code> : explictly tie an injected field or method to a particular injector (by name). Can also be on other annotations.</p>
+<p><code>@Filter</code> : an OSGi service filter</p>
+<p><code>@PostConstruct</code> : methods to call upon model option creation (only for model classes)</p>
+<p><code>@Via</code> : use a JavaBean property of the adaptable as the source of the injection</p>
+<p><code>@Default</code> : set default values for a field or method</p>
+<p><code>@Path</code> : only used together with the resource-path injector to specify the path of a resource</p>
+<p><code>@Exporters</code>/<code>@Exporter</code>/<code>@ExporterOptions</code>/<code>@ExporterOption</code> : See Exporter Framework section below</p>
+<p>In addition all <a href="#injector-specific-annotations">injector-specific annotations</a>.</p>
+<h1>Available Injectors</h1>
+<table>
+ <thead>
+ <tr>
+ <th>Title </th>
+ <th>Name (for <code>@Source</code>) </th>
+ <th>Service Ranking </th>
+ <th>Available Since (Implementation Version) </th>
+ <th>Description </th>
+ <th>Applicable To (including using <code>@Via</code>) </th>
+ <th>Accepts Null Name? </th>
+ <th>Array Support </th>
+ <th>Parameterized Type Support</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Script Bindings </td>
+ <td><code>script-bindings</code> </td>
+ <td>1000 </td>
+ <td>1.0.0 </td>
+ <td>Lookup objects in the script bindings object by name. </td>
+ <td>A ServletRequest object which has the <code>Sling Bindings</code> attribute defined </td>
+ <td>no </td>
+ <td>no conversion is done </td>
+ <td>If a parameterized type is passed, the bindings value must be of a compatible type of the parameterized type.</td>
+ </tr>
+ <tr>
+ <td>Value Map </td>
+ <td><code>valuemap</code> </td>
+ <td>2000 </td>
+ <td>1.0.0 </td>
+ <td>Gets a property from a <code>ValueMap</code> by name. </td>
+ <td>Any object which is or can be adapted to a <code>ValueMap</code></td>
+ <td>no </td>
+ <td>Primitive arrays wrapped/unwrapped as necessary. Wrapper object arrays are unwrapped/wrapped as necessary. </td>
+ <td>Parameterized <code>List</code> and <code>Collection</code> injection points are injected by getting an array of the component type and creating an unmodifiable <code>List</code> from the array.</td>
+ </tr>
+ <tr>
+ <td>Child Resources </td>
+ <td><code>child-resources</code> </td>
+ <td>3000 </td>
+ <td>1.0.0 </td>
+ <td>Gets a child resource by name. </td>
+ <td><code>Resource</code> objects </td>
+ <td>no </td>
+ <td>none </td>
+ <td>if a parameterized type <code>List</code> or <code>Collection</code> is passed, a <code>List<Resource></code> 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.</td>
+ </tr>
+ <tr>
+ <td>Request Attributes </td>
+ <td><code>request-attributes</code> </td>
+ <td>4000 </td>
+ <td>1.0.0 </td>
+ <td>Get a request attribute by name. </td>
+ <td><code>ServletRequest</code> objects </td>
+ <td>no </td>
+ <td>no conversion is done </td>
+ <td>If a parameterized type is passed, the request attribute must be of a compatible type of the parameterized type.</td>
+ </tr>
+ <tr>
+ <td>OSGi Services </td>
+ <td><code>osgi-services</code> </td>
+ <td>5000 </td>
+ <td>1.0.0 </td>
+ <td>Lookup services based on class name. Since Sling Models Impl 1.2.8 (<a href="https://issues.apache.org/jira/browse/SLING-5664">SLING-5664</a>) 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). </td>
+ <td>Any object </td>
+ <td>yes </td>
+ <td>yes </td>
+ <td>Parameterized <code>List</code> and <code>Collection</code> injection points are injected by getting an array of the services and creating an unmodifiable <code>List</code> from the array.</td>
+ </tr>
+ <tr>
+ <td>Resource Path </td>
+ <td><code>resource-path</code> </td>
+ <td>2500 </td>
+ <td>1.1.0 </td>
+ <td>Injects one or multiple resources. The resource paths are either given by <code>@Path</code> annotations, the element <code>path</code> or <code>paths</code> of the annotation <code>@ResourcePath</code> or by paths given through a resource property being referenced by either <code>@Named</code> or element <code>name</code> of the annotation <code>@ResourcePath</code>. </td>
+ <td><code>Resource</code> or <code>SlingHttpServletRequest</code> objects </td>
+ <td>yes </td>
+ <td>yes </td>
+ <td>none</td>
+ </tr>
+ <tr>
+ <td>Self </td>
+ <td><code>self</code> </td>
+ <td><code>Integer.MAX_VALUE</code> </td>
+ <td>1.1.0 </td>
+ <td>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. </td>
+ <td>Any object </td>
+ <td>yes </td>
+ <td>none </td>
+ <td>none</td>
+ </tr>
+ <tr>
+ <td>Sling Object </td>
+ <td><code>sling-object</code> </td>
+ <td><code>Integer.MAX_VALUE</code> </td>
+ <td>1.1.0 </td>
+ <td>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 <code>SlingHttpServletRequest</code> while <code>ResourceResolver</code> can only resolve the <code>ResourceResolver</code> object and nothing else. A discussion around this limitation can be found at <a href="https://issues.apache.org/jira/browse/SLING-4083">SLING-4083</a>. Also <code>Resource</code>s can only be injected if the according injector-specific annotation is used (<code>@SlingObject</code>). </td>
+ <td><code>Resource</code>, <code>ResourceResolver</code> or <code>SlingHttpServletRequest</code> objects (not all objects can be resolved by all adaptables). </td>
+ <td>yes </td>
+ <td>none </td>
+ <td>none</td>
+ </tr>
+ </tbody>
+</table>
+<h1>Injector-specific Annotations</h1>
+<p><em>Introduced with <a href="https://issues.apache.org/jira/browse/SLING-3499">SLING-3499</a> in Sling Models Impl 1.0.6</em></p>
+<p>Sometimes it is desirable to use customized annotations which aggregate the standard annotations described above. This will generally have the following advantages over using the standard annotations:</p>
+<ul>
+ <li>Less code to write (only one annotation is necessary in most of the cases)</li>
+ <li>More robust (in case of name collisions among the different injectors, you make sure that the right injector is used)</li>
+ <li>Better IDE support (because the annotations provide elements for each configuration which is available for that specific injector, i.e. <code>filter</code> only for OSGi services)</li>
+</ul>
+<p>The follow annotations are provided which are tied to specific injectors:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Annotation </th>
+ <th>Supported Optional Elements </th>
+ <th>Injector </th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>@ScriptVariable</code> </td>
+ <td><code>injectionStrategy</code> and <code>name</code> </td>
+ <td><code>script-bindings</code> </td>
+ <td>Injects the script variable defined via <a href="https://cwiki.apache.org/confluence/display/SLING/Scripting+variables">Sling Bindings</a>. If <code>name</code> is not set the name is derived from the method/field name.</td>
+ </tr>
+ <tr>
+ <td><code>@ValueMapValue</code> </td>
+ <td><code>injectionStrategy</code>, <code>name</code> and <code>via</code> </td>
+ <td><code>valuemap</code> </td>
+ <td>Injects a <code>ValueMap</code> value. If <code>via</code> is not set, it will automatically take <code>resource</code> if the adaptable is the <code>SlingHttpServletRequest</code>. If <code>name</code> is not set the name is derived from the method/field name.</td>
+ </tr>
+ <tr>
+ <td><code>@ChildResource</code> </td>
+ <td><code>injectionStrategy</code>, <code>name</code> and <code>via</code> </td>
+ <td><code>child-resources</code> </td>
+ <td>Injects a child resource by name. If <code>via</code> is not set, it will automatically take <code>resource</code> if the adaptable is the <code>SlingHttpServletRequest</code>. If <code>name</code> is not set the name is derived from the method/field name.</td>
+ </tr>
+ <tr>
+ <td><code>@RequestAttribute</code> </td>
+ <td><code>injectionStrategy</code>, <code>name</code> and <code>via</code> </td>
+ <td><code>request-attributes</code> </td>
+ <td>Injects a request attribute by name. If <code>name</code> is not set the name is derived from the method/field name.</td>
+ </tr>
+ <tr>
+ <td><code>@ResourcePath</code> </td>
+ <td><code>injectionStrategy</code>, <code>path</code>, and <code>name</code> </td>
+ <td><code>resource-path</code> </td>
+ <td>Injects a resource either by path or by reading a property with the given name.</td>
+ </tr>
+ <tr>
+ <td><code>@OSGiService</code> </td>
+ <td><code>injectionStrategy</code>, <code>filter</code> </td>
+ <td><code>osgi-services</code> </td>
+ <td>Injects an OSGi service by type. The <code>filter</code> can be used give an OSGi service filter.</td>
+ </tr>
+ <tr>
+ <td><code>@Self</code> </td>
+ <td><code>injectionStrategy</code> </td>
+ <td><code>self</code> </td>
+ <td>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.</td>
+ </tr>
+ <tr>
+ <td><code>@SlingObject</code> </td>
+ <td><code>injectionStrategy</code> </td>
+ <td><code>sling-object</code> </td>
+ <td>Injects commonly used sling objects if the field matches with the class: request, response, resource resolver, current resource, SlingScriptHelper</td>
+ </tr>
+ </tbody>
+</table>
+<h2>Hints</h2>
+<p>Those annotations replace <code>@Via</code>, <code>@Filter</code>, <code>@Named</code>, <code>@Optional</code>, <code>@Required</code>, <code>@Source</code> and <code>@Inject</code>. Instead of using the deprecated annotation element <code>optional</code> you should rather use <code>injectionStrategy</code> with the values <code>DEFAULT</code>, <code>OPTIONAL</code> or <code>REQUIRED</code> (see also <a href="https://issues.apache.org/jira/browse/SLING-4155">SLING-4155</a>). <code>@Default</code> may still be used in addition to the injector-specific annotation to set default values. All elements given above are optional.</p>
+<h2>Custom Annotations</h2>
+<p>To create a custom annotation, implement the <code>org.apache.sling.models.spi.injectorspecific.StaticInjectAnnotationProcessorFactory</code> interface. This interface may be implemented by the same class as implements an injector, but this is not strictly necessary. Please refer to the injectors in <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/injectors/">Subversion</a> for examples.</p>
+<h1>Specifying an Alternate Adapter Class (since 1.1.0)</h1>
+<p>By default, each model class is registered using its own implementation class as adapter. If the class has additional interfaces this is not relevant.</p>
+<p>The <code>@Model</code> annotations provides an optional <code>adapters</code> attribute which allows specifying under which type(s) the model implementation should be registered in the Models Adapter Factory. Prior to <em>Sling Models Impl 1.3.10</em> only the given class names are used as adapter classes, since 1.3.10 the implementation class is always being registered implicitly as adapter as well (see <a href="https://issues.apache.org/jira/browse/SLING-6658">SLING-6658</a>). With this attribute it is possible to register the model to one (or multiple) interfaces, or a superclass. This allows separating the model interface from the implementation, which makes it easier to provide mock implementations for unit tests as well.</p>
+<p>Example:</p>
+<p>::java @Model(adaptables = Resource.class, adapters = MyService.class) public class MyModel implements MyService { // injects fields and implements the MyService methods }</p>
+<p>In this example a <code>Resource</code> can be adapted to a <code>MyService</code> interface, and the Sling Models implementation instantiates a <code>MyModel</code> class for this.</p>
+<p>It is possible to have multiple models implementing the same interface. By default Sling Models will just take the first one ordered alphabetically by the class name. Applications can provide an OSGi service implementing the <code>ImplementationPicker</code> SPI interface which could use context to determine which implementation can be chosen, e.g. depending an a tenant or content path context. If multiple implementations of the <code>ImplementationPicker</code> interface are present, they are queried one after another in order of their service ranking property, the first one that picks an implementation wins.</p>
+<h1>Associating a Model Class with a Resource Type (since 1.3.0)</h1>
+<p>The <code>@Model</code> annotation provides an optional <code>resourceType</code> attribute which allows for model classes to be associated with one or more resource types. This is used in three different ways.</p>
+<p>In the case of multiple model classes implementing the same interface, the class with the "closest" resource type will be used when adapting to the interface.</p>
+<p>The <code>ModelFactory</code> service interface has methods <code>Object getModelFromResource(Resource)</code> and <code>Object getModelFromRequest(SlingHttpServletRequest)</code> which will dynamically determine the adapter class based on the <code>Resource</code> using its type. In the case of the <code>SlingHttpServletRequest</code> method, it uses the request's <code>Resource</code> object (i.e. by calling <code>request.getResource()</code>)</p>
+<p>The resource type is also used as part of the Exporter framework (see next section).</p>
+<h1>Exporter Framework (since 1.3.0)</h1>
+<p>Sling Models objects can be exported to arbitrary Java objects through the Sling Models Exporter framework. Model objects can be programatically exported by calling the <code>ModelFactory</code> method <code>exportModel()</code>. This method takes as its arguments:</p>
+<ul>
+ <li>the model object</li>
+ <li>an exporter name</li>
+ <li>a target class</li>
+ <li>a map of options</li>
+</ul>
+<p>The exact semantics of the exporting will be determined by an implementation of the <code>ModelExporter</code> service interface. Sling Models currently includes a single exporter, using the Jackson framework, which is capable of serializing models as JSON or transforming them to <code>java.util.Map</code> objects.</p>
+<p>In addition, model objects can have servlets automatically registered for their resource type (if it is set) using the <code>@Exporter</code> annotation. For example, a model class with the annotation</p>
+<p>::java @Model(adaptable = Resource.class, resourceType = "myco/components/foo") @Exporter(name = "jackson", extensions = "json")</p>
+<p>results in the registration of a servlet with the resource type and extension specified and a selector of 'model' (overridable through the <code>@Exporter</code> annotation's <code>selector</code> attribute). When this servlet is invoked, the <code>Resource</code> will be adapted to the model, exported as a <code>java.lang.String</code> (via the named Exporter) and then returned to the client.</p>
+<h1>Registration of Sling Models classes via bnd plugin</h1>
+<p>With the Sling Models bnd plugin it is possible to automatically generated the necessary bundle header to register the Sling Models classes contained in the Maven bundle project - either with maven-bundle-plugin or with bnd-maven-plugin. By default the plugin generates a <code>Sling-Model-Classes</code> header (only compatible with Sling Models Impl since version 1.3.4, see <a href="https://issues.apache.org/jira/browse/SLING-6308">SLING-6308</a>).</p>
+<p>Example configuration:</p>
+<h1>!xml</h1>
+<p><plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <_plugin>org.apache.sling.bnd.models.ModelsScannerPlugin</_plugin> </instructions> </configuration> <dependencies> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.bnd.models</artifactId> <version>1.0.0</version> </dependency> </dependencies> </plugin></p>
+<p>If a <code>Sling-Model-Packages</code> or <code>Sling-Model-Classes</code> was already manually defined for the bundle the bnd plugin does nothing. So if you want to migrate an existing project to use this plugin remove the existing header definitions.</p>
+<p>If you want to generate a bundle header compliant with Sling Models < 1.3.4 (i.e. <code>Sling-Model-Packages</code>) you need to specify the attribute <code>generatePackagesHeader=true</code>. An example configuration looks like this</p>
+<h1>!xml</h1>
+<p><configuration> <instructions> <_plugin>org.apache.sling.bnd.models.ModelsScannerPlugin;generatePackagesHeader=true</_plugin> </instructions> </configuration></p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/nosql-resource-providers.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/nosql-resource-providers.html b/documentation/bundles/nosql-resource-providers.html
new file mode 100644
index 0000000..7b151c2
--- /dev/null
+++ b/documentation/bundles/nosql-resource-providers.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>NoSQL Resource Providers (org.apache.sling.nosql)</h1></header><p>[TOC]</p>
+<h2>Introduction</h2>
+<p>Apache Sling provides resource-based access to NoSQL document stores like MongoDB and Couchbase via its Resource API using the NoSQL resource providers. This is possible in combination with a JCR-based repository (e.g. only on a special path in the resource tree), or a only persistence for the whole resource tree depending on the resource provider configuration.</p>
+<p>The general concept of retrieving from and storing resource data in NoSQL document stores is the same independently from the NoSQL product used:</p>
+<ul>
+ <li>For each resource a structured document is stored (usually in JSON format)</li>
+ <li>The path of the resource is the key of the document</li>
+ <li>The properties of the resource are stored in a map-like form in the document</li>
+ <li>Special mapping applies to convert special data types like numbers, dates and binary data to a format that can safely stored in the document event if the format is not natively supported (e.g. converting dates to strings and binary to base64)</li>
+ <li>The Sling CRUD support defines a simple transaction model with buffering all changes in memory until a call to "commit()" persists them to the NoSQL database</li>
+ <li>Iterating over child resources and deleting a resource including all descendants requires some basic query capabilities in the NoSQL store</li>
+</ul>
+<p>All these general features are implemented in an abstraction layer called <a href="https://github.com/apache/sling/tree/trunk/contrib/nosql/generic">"Apache Sling NoSQL Generic Resource Provider"</a>, which is used by the resource provider implementations per NoSQL product. Those implementation than only implement a thin "adapter" which maps the resource data to the NoSQL product-specific storage formats and query capabilities, without having to care about all the complex resource provider handling.</p>
+<p>This generic resource provider also contains a set of integration tests covering the most relevant resource read- and write usecases which can be used to test a NoSQL product-specific resource provider implementation and the underlying NoSQL database.</p>
+<h2>MongoDB NoSQL Resource Provider</h2>
+<p>Resource provider for <a href="https://www.mongodb.org/">MongoDB</a> NoSQL database.</p>
+<p>Tested with MongoDB Server 3.0.6 and MongoDB Java Driver 3.1.1.</p>
+<p>Configuration example:</p>
+<p>org.apache.sling.nosql.mongodb.resourceprovider.MongoDBNoSqlResourceProviderFactory.factory.config-default provider.roots=["/"] connectionString="localhost:27017" database="sling" collection="resources"</p>
+<p>See Apache Felix OSGi console for detailed documentation of the parameters. All resource data is stored in one Collection of one MongoDB database. Each resource is stored as a document with the path stored in an "_id" property.</p>
+<p>Source code: <a href="https://github.com/apache/sling/tree/trunk/contrib/nosql/mongodb-resourceprovider">Apache Sling NoSQL MongoDB Resource Provider</a></p>
+<p>Please note: there is an <a href="https://github.com/apache/sling/tree/trunk/contrib/extensions/mongodb">alternative MongoDB resource provider implementation</a> from 2012 which has less features, a slightly different concept for storing resource data (in multiple collections), and it does not use the "Generic Resource Provider".</p>
+<h2>Couchbase NoSQL Resource Provider</h2>
+<p>Resource provider for <a href="http://www.couchbase.com/">Couchbase</a> NoSQL database.</p>
+<p>Tested with Couchbase Server 4.0.0 and Couchbase Java SDK 2.2.4. Please note: Couchbase 4 or higher is mandatory because N1QL support is required.</p>
+<p>Configuration example:</p>
+<p>org.apache.sling.nosql.couchbase.resourceprovider.CouchbaseNoSqlResourceProviderFactory.factory.config-default provider.roots=["/"]</p>
+<p>org.apache.sling.nosql.couchbase.client.CouchbaseClient.factory.config-default clientId="sling-resourceprovider-couchbase" couchbaseHosts="localhost:8091" bucketName="sling" enabled=B"true"</p>
+<p>See Apache Felix OSGi console for detailed documentation of the parameters. All resource data is stored in one Couchbase bucket. Each resource is stored as a document with the path as key.</p>
+<p>Source code: <a href="https://github.com/apache/sling/tree/trunk/contrib/nosql/couchbase-resourceprovider">Apache Sling NoSQL Couchbase Resource Provider</a></p>
+<p>The resource provider requires and additional bundle <a href="https://github.com/apache/sling/tree/trunk/contrib/nosql/couchbase-client">Apache Sling NoSQL Couchbase Client</a> which wraps the Couchbase Java SDK (which itself is not an OSGi bundle), and ensures that the Couchbase Environment instance is used as a singleton in the VM.</p>
+<h2>Example Launchpad</h2>
+<p>An example launchpad is provided that contains the NoSQL resource providers configured as main resource provider at <code>/</code>.</p>
+<p>Source code: <a href="https://github.com/apache/sling/tree/trunk/contrib/nosql/launchpad">Apache Sling NoSQL Launchpad</a></p>
+<p>See README for details how to start the launchpad.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/bundles/org-apache-sling-junit-bundles.html
----------------------------------------------------------------------
diff --git a/documentation/bundles/org-apache-sling-junit-bundles.html b/documentation/bundles/org-apache-sling-junit-bundles.html
new file mode 100644
index 0000000..fd937ad
--- /dev/null
+++ b/documentation/bundles/org-apache-sling-junit-bundles.html
@@ -0,0 +1,127 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>JUnit server-side testing support bundles</h1></header><p>This is an overview of the Sling bundles that provide support for server-side JUnit tests.</p>
+<p>The Maven modules below <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/samples"><code>testing/samples</code></a> provide different examples including HTTP-based and server-side teleported tests in a bundle module, running against a full Sling instance setup in the same Maven module.</p>
+<h2>org.apache.sling.junit.core: server-side JUnit tests support</h2>
+<p>This bundle provides a <code>JUnitServlet</code> that runs JUnit tests found in bundles.</p>
+<div class="warning">
+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.
+</div>
+<div class="note">
+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.
+</div>
+<p>To make tests available to that servlet, the bundle that contains them must point to them with a <code>Sling-Test-Regexp</code> bundle header that defines a regular expression that matches the test class names, like for example:</p>
+<p>Sling-Test-Regexp=com.example.*ServerSideTest</p>
+<h3>The TeleporterRule</h3>
+<p>The <code>TeleporterRule</code> supplied by this bundle (since V1.0.12) makes it easy to write such tests, as it takes care of all the mechanics of</p>
+<ol>
+ <li>creating the test bundle including all necessary classes for execution</li>
+ <li>adding the <code>Sling-Test-Regexp</code> header to the bundles manifest</li>
+ <li>deploy the bundle on an Sling server (with the help of the customizer)</li>
+ <li>calling the <code>JUnitServlet</code> from the client-side and report back the results</li>
+ <li>uninstalling the test bundle</li>
+</ol>
+<p>Most of these steps are done on the client-side by the org.apache.sling.junit.teleporter module (see below).</p>
+<p>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 <code>junit.core</code> and <code>junit.teleporter</code> modules described on this page to create such tests.</p>
+<p>Here's a basic example of a server-side test that accesses OSGi services:</p>
+<p>public class BasicTeleporterTest {</p>
+<p>@Rule public final TeleporterRule teleporter = TeleporterRule.forClass(getClass(), "Launchpad");</p>
+<p>@Test public void testConfigAdmin() throws IOException { final String pid = "TEST_" + getClass().getName() + UUID.randomUUID();</p>
+<p>final ConfigurationAdmin ca = teleporter.getService(ConfigurationAdmin.class); assertNotNull("Teleporter should provide a ConfigurationAdmin", ca);</p>
+<p>final Configuration cfg = ca.getConfiguration(pid); assertNotNull("Expecting to get a Configuration", cfg); assertEquals("Expecting the correct pid", pid, cfg.getPid()); } }</p>
+<p>That's all there is to it, the <code>TeleporterRule</code> takes care of the rest.</p>
+<p>The test bundle being build and deployed through this rule usually happens quickly as the temporary bundle is very small. Both the client-side and server-side parts of the test can be debugged easily with the appropriate IDE settings.</p>
+<p>The <code>Teleporter.getService</code> method takes an optional OSGi LDAP filter for service selection, like for example:</p>
+<p>final StringTransformer t = teleporter.getService(StringTransformer.class, "(mode=uppercase)");</p>
+<p>The method waits for the service to be available or until the timeout elapsed (<a href="https://issues.apache.org/jira/browse/SLING-6031">SLING-6031</a>).</p>
+<p>And starting with version 1.0.4 of the <code>org.apache.sling.junit.teleporter</code> bundle, you can specify resources to embed in the test bundle, as in this example:</p>
+<p>@Rule public final TeleporterRule teleporter = TeleporterRule.forClass(getClass(), "Launchpad") .withResources("/foo/", "/some/other/resource.txt");</p>
+<p>which will embed all resources found under <code>/foo</code> as well as the <code>resource.txt</code> in the test bundle, making them available to the server-side tests.</p>
+<p>This teleporter mechanism is used in our integration tests, search for <code>TeleporterRule</code> in there for examples or look at the <a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/teleporter"><code>integrationtest.teleporter</code></a> package.</p>
+<p>As I write this the teleporter mechanism is quite new, I suspect there might be some weird interactions between things like <code>@AfterClass</code>, custom test runners and this mechanism but it works well to a growing number of tests in our <code>launchpad/integration-tests</code> module. Moving to JUnit <code>Rules</code> as much as possible, and combining them using JUnit's <code>RuleChain</code>, should help work around such limitations if they arise.</p>
+<h3>More details on the JUnitServlet</h3>
+<p>To try the JUnitServlet interactively, you can install a bundle that contains tests and a <code>Sling-Test-Regexp</code> bundle header that points to them, as described above. Or use the <code>TeleporterRule</code> and set a breakpoint in the tests execution, when the test bundle in installed and listed by the test servlet.</p>
+<p>To list the available tests, open <code>/system/sling/junit/</code> in your browser. The servlet shows available tests and allows you to execute them via a POST request.</p>
+<p>Adding a path allows you to select a specific subset of tests, as in <code>/system/sling/junit/org.apache.sling.junit.remote.html</code></p>
+<p>The JUnitServlet provides various output formats, including in particular JSON, see <code>/system/sling/junit/.json</code> for example.</p>
+<h2>org.apache.sling.junit.teleporter: client-side TeleporterRule support</h2>
+<p>This module provides the <code>ClientSideTeleporter</code> which the <code>TeleporterRule</code> uses to package the server-side tests in bundles that's installed temporarily on the test server. Almost all steps described above in <a href="#the-teleporterrule">The TeleporterRule</a> are being performed by this module.</p>
+<p>This module is not a bundle, as it's used on the client only, as a dependency when running the tests.</p>
+<h3>TeleporterRule.Customizer</h3>
+<p>A <code>TeleporterRule.Customizer</code> is used to setup the <code>ClientSideTeleporter</code>. That customizer is instantiated dynamically based on a String passed to the <code>TeleporterRule.forClass</code> method as 2nd parameter. As an example from our <code>launchpad/integration-tests</code> module, this call</p>
+<p>TeleporterRule.forClass(getClass(), "Launchpad:author");</p>
+<p>causes the <code>TeleporterRule</code> to use the <code>org.apache.sling.junit.teleporter.customizers.LaunchpadCustomizer</code> class to setup the <code>ClientSideTeleporter</code>, and passes the "author" string to it as an option. Although our current <code>LaunchpadCustomizer</code> does not use this options string, it is meant to select a specific server (of family of servers) to run the tests on.</p>
+<p>The options string can also use a full class name instead of the <code>Launchpad</code> short form used here, if needed. The part of that string that follows the first colon is passed to the customizer as is.</p>
+<p>Using Strings for customization reduces the coupling with the <code>junit.core</code> bundle, as it does not need to know those classes which are used only on the client side when running tests.</p>
+<p>If <code>TeleporterRule.forClass(getClass())</code> is used (the method without an additional 2nd parameter) the default customizer is used (<a href="https://issues.apache.org/jira/browse/SLING-5677">SLING-5677</a>, since version 1.0.8).</p>
+<p>The following customizers are currently used in Sling</p>
+<h3>Default Customizer</h3>
+<p><em><a href="https://svn.apache.org/repos/asf/sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/DefaultPropertyBasedCustomizer.java">DefaultPropertyBasedCustomizer.java</a></em> is used by default when no other customizer is referenced in <code>TeleporterRule.forClass(getClass())</code>. It relies on the following system properties:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Property Name </th>
+ <th>Description </th>
+ <th>Mandatory to set </th>
+ <th>Default value </th>
+ <th>Since version </th>
+ <th>Related JIRA </th>
+ </tr>
+ </thead>
+</table>
+<p>| <code>ClientSideTeleporter.baseUrl</code> | base url of the Sling Server to which to deploy. | yes | - | 1.0.8 | <a href="https://issues.apache.org/jira/browse/SLING-5677">SLING-5677</a> | | <code>ClientSideTeleporter.includeDependencyPrefixes</code> | 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 | <a href="https://issues.apache.org/jira/browse/SLING-5677">SLING-5677</a> | | <code>ClientSideTeleporter.excludeDependencyPrefixes</code> | 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 <code>ClientSideTeleporter.includeDependencyPrefixes</code>. | no | - | 1.0.8 | <a href="https://issues.apache.org/jira/browse/SLING-5677">SLING-5677</a> | | <code>ClientSideTeleporter.embedClasses</code> | 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 | <a href="https://issues.apache.org/jira/browse/SLING-5677">SLING-5677</a> | | <code>ClientSideTeleporter.embedClassesDirectories</code> | 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 | <a href="https://issues.apache.org/jira/browse/SLING-6551">SLING-6551</a> | | <cod
e>ClientSideTeleporter.additionalBundleHeaders</code> | comma-separated list of entries in the format <code><name>:<value></code> which should be added to the test bundle as additional headers | no | - | 1.0.12 | <a href="https://issues.apache.org/jira/browse/SLING-6558">SLING-6558</a> | | <code>ClientSideTeleporter.testReadyTimeoutSeconds</code> | how long to wait for our test to be ready on the server-side in seconds, after installing the test bundle. | no | <code>12</code> | 1.0.8 | <a href="https://issues.apache.org/jira/browse/SLING-5677">SLING-5677</a> | | <code>ClientSideTeleporter.serverUsername</code> | the username with which to send requests to the Sling server. | no | <code>admin</code> | 1.0.8 | <a href="https://issues.apache.org/jira/browse/SLING-5677">SLING-5677</a> | | <code>ClientSideTeleporter.serverPassword</code> | the password with which to send requests to the Sling server. | no | <code>admin</code> | 1.0.8 | <a href="https://issues.apache.org/jira/
browse/SLING-5677">SLING-5677</a> | | <code>ClientSideTeleporter.enableLogging</code> | set to <code>true</code> to log the tasks being performed by the teleporter. Useful for debugging. | no | <code>false</code> | 1.0.12 | <a href="https://issues.apache.org/jira/browse/SLING-6546">SLING-6546</a> | | <code>ClientSideTeleporter.preventToUninstallBundle</code> | set to <code>true</code> to not automatically uninstall the test bundle after test execution. Useful for debugging. | no | <code>false</code> | 1.0.12 | <a href="https://issues.apache.org/jira/browse/SLING-6546">SLING-6546</a> | | <code>ClientSideTeleporter.testBundleDirectory</code> | 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 <code>${project.build.directory}/test-bundles</code>. | no | - | 1.0.12 | <a href="https://issues.apache.org/jira/browse/SLING-6546">SLING
-6546</a> |</p>
+<p>The provisioning of an appropriate instance can be done with the <a href="/documentation/development/slingstart.html">slingstart-maven-plugin</a>. An example for that is given at <a href="https://svn.apache.org/viewvc/sling/trunk/testing/samples/module-with-it"><code>testing/samples/module-with-it</code></a>. Since <code>slingstart-maven-plugin</code> 1.5.0 it is possible to bootstrap a Sling Server from a <code>model.txt</code> below <code>src/test/provisioning</code> independent of the packaging (see <a href="https://issues.apache.org/jira/browse/SLING-6068">SLING-6068</a>).</p>
+<h4>LaunchpadCustomizer</h4>
+<p>The <em><a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/junit/teleporter/customizers/LaunchpadCustomizer.java"><code>LaunchpadCustomizer.java</code></a></em> only verifies that a Sling instance is ready at a given port and configures the <code>ClientSideTeleporter</code> to deploy to <code>http://localhost:8888</code> with the credentials <code>admin</code>:<code>admin</code>. <code>LaunchpadCustomizer</code> uses the <code>HttpTestBase</code> therefore some parameters are customizable through system properties. There is no bootstrapping of an instance done here, so this must be done separately!</p>
+<h4>BWIT_TeleporterCustomizer</h4>
+<p>The <em><a href="http://svn.apache.org/viewvc/sling/trunk/testing/samples/bundle-with-it/src/test/java/org/apache/sling/junit/teleporter/customizers/BWIT_TeleporterCustomizer.java"><code>BWIT_TeleporterCustomizer.java</code></a></em> relies on <code>SlingTestBase</code> to set the server's base url and credentials. Additionally the test bundle is adjusted so that the API is not included in it (but rather referenced from another bundle). The bootstrapping of the Sling instance is tweaked through system properties which are desribed <a href="http://labs.6dglobal.com/blog/2013-06-05/creating-integration-tests-apache-sling/">here</a> and implicitly done by the customizer itself.</p>
+<p>Those should give you an overview on what can be done with a customizer and decide whether you need to write your own one or using the default customizer is just enough.</p>
+<h2>org.apache.sling.junit.healthcheck: run JUnit tests as Sling Health Checks</h2>
+<p>This bundle allows JUnit tests to run as <a href="/documentation/bundles/sling-health-check-tool.html">Sling Health Checks</a>, which can be useful when defining smoke tests for example, allowing them to be used both at build time and run time.</p>
+<p>See the <code>JUnitHealthCheck</code> class for details.</p>
+<h2>org.apache.sling.junit.scriptable: scriptable server-side tests</h2>
+<p>This bundle allows Sling scripts to be executed from the <code>JUnitServlet</code> as JUnit tests, as follows:</p>
+<ul>
+ <li>A node that has the <code>sling:Test</code> mixin is a scriptable test node.</li>
+ <li>For security reasons, scriptable test nodes are only executed as tests if they are found under <code>/libs</code> or <code>/apps</code>, or more precisely under a path that's part of Sling's <code>ResourceResolver</code> search path.</li>
+ <li>To execute a test, the scriptable tests provider makes an HTTP request to the test node's path, with a <code>.test.txt</code> selector and extension, and expects the output to contain only the string <code>TEST_PASSED</code>. Empty lines and comment lines starting with a hash sign (#) are ignored in the output, and other lines are reported as failures.</li>
+</ul>
+<p>Here's a minimal example that sets up and executes a scriptable test:</p>
+<p>$ curl -u admin:admin -Fjcr:primaryNodeType=sling:Folder -Fsling:resourceType=foo -Fjcr:mixinTypes=sling:Test http://localhost:8080/apps/foo ... $ echo TEST_PASSED > /tmp/test.txt.esp ; curl -u admin:admin -T/tmp/test.txt.esp http://localhost:8080/apps/foo/test.txt.esp</p>
+<p>At this point, foo.test.txt is what the scriptable test framework will request, and that outputs just TEST_PASSED:</p>
+<p>$ curl -u admin:admin http://localhost:8080/apps/foo.test.txt TEST_PASSED</p>
+<p>And a POST to the JUnit servlet returns information on the test's execution:</p>
+<p>curl -u admin:admin -XPOST http://localhost:8080/system/sling/junit/org.apache.sling.junit.scriptable.ScriptableTestsProvider.json [{ "INFO_TYPE": "test", "description": "verifyContent<a href="org.apache.sling.junit.scriptable.TestAllPaths">0</a>", "test_metadata": { "test_execution_time_msec": 2 } } ]</p>
+<p>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.</p>
+<h2>org.apache.sling.junit.remote: obsolete</h2>
+<p>The <code>org.apache.sling.junit.remote</code> bundle provides utilities to run server-side JUnit tests, but using the newer <code>TeleporterRule</code> described above is much simpler. As a result, this bundle should only be needed for existing tests that were written using its mechanisms.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
[16/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/getting-started/discover-sling-in-15-minutes.md
----------------------------------------------------------------------
diff --git a/content/documentation/getting-started/discover-sling-in-15-minutes.md b/content/documentation/getting-started/discover-sling-in-15-minutes.md
deleted file mode 100644
index e2adb7f..0000000
--- a/content/documentation/getting-started/discover-sling-in-15-minutes.md
+++ /dev/null
@@ -1,213 +0,0 @@
-title=Discover Sling in 15 minutes
-type=page
-status=published
-~~~~~~
-
-The Sling Launchpad is a ready-to-run Sling configuration, providing an embedded JCR content repository and web server, a selection of Sling components, documentation and examples. The Launchpad makes it easy to get started with Sling and to develop script-based applications.
-
-This page will help you get started with the Launchpad. Fifteen minutes should be enough to get an overview of what Sling does.
-
-While simple to run and understand, the Launchpad is a full-featured instance of Sling, an example configuration that we have created with the most common modules and configurations. The full functionality of Sling is available by loading additional Sling (or custom) OSGi bundles as needed, using the Launchpad's web-based OSGi management console.
-
-[TOC]
-
-## See Also
-
-
-More Sling samples can be found under
-[http://svn.apache.org/repos/asf/sling/trunk/samples/](http://svn.apache.org/repos/asf/sling/trunk/samples/)
-
-Once you grok the basic examples of this page, we recommend studying the
-*slingbucks* and *espblog* samples. Both have README files with more info.
-
-## Prerequisites
-
-We'll start with the self-runnable jar from the Sling distribution, you only need a Java 7 JDK. Download the latest release from the Sling [Downloads](/downloads.cgi) page or by clicking this link: [org.apache.sling.launchpad-8.jar](http://www.apache.org/dyn/closer.lua/sling/org.apache.sling.launchpad-8.jar). Alternatively you can deploy the [Sling Web application](http://www.apache.org/dyn/closer.lua/sling/org.apache.sling.launchpad-8-webapp.war) into any decent Servlet Container such as Jetty or Tomcat or you can [build the current source yourself](/documentation/development/getting-and-building-sling.html).
-
-To show the simplicity of the REST-style approach taken by Sling the examples below will be using [cURL](http://curl.haxx.se/). Any HTTP client would do, but cURL is the easiest to document in a reproducible way.
-
-A WebDAV client makes editing server-side scripts much more convenient, but to make our examples easy to reproduce, we're using cURL below to create and update files in the JCR repository, via the Sling WebDAV server.
-
-
-## Start the Launchpad
-
-After downloading the Sling Launchpad self-runnable jar just start it as follows:
-
-
-$ java -jar org.apache.sling.launchpad-8.jar
-
-
-This starts the Sling embedded Web Server on port 8080 and writes application files into the `sling` folder found in the current working directory.
-
-Once started, look at [http://localhost:8080/system/console/bundles](http://localhost:8080/system/console/bundles) with your browser. Use *admin* with password *admin* if Sling asks you for a login. Sling then displays the *Felix Web Management Console* page.
-
-
-On the bundles page, all bundles should be marked *Active*. They're all [OSGi](http://www.osgi.org/) bundles powered by [Apache Felix](http://felix.apache.org), but that doesn't really matter to us right now.
-
-*Log files: If things go wrong, have a look at the `sling/logs/error.log` log file - that's where Sling writes any error messages.*
-
-## Create some content
-
-Until we have ready-to-test forms, you can create content with cURL, or you can create an HTML form that posts to the specified URL.
-
-To create a content node (nodes are a [JCR](http://jackrabbit.apache.org/) concept, a unit of storage) with cURL, use:
-
-
-curl -u admin:admin -F"sling:resourceType=foo/bar" -F"title=some title" http://localhost:8080/content/mynode
-
-
-The resulting node can be seen at [http://localhost:8080/content/mynode.html](http://localhost:8080/content/mynode.html.path), or as json format under [http://localhost:8080/content/mynode.json](http://localhost:8080/content/mynode.json). Lets try with cURL:
-
-$ curl http://localhost:8080/content/mynode.json
-
-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"}
-
-The additional property `jcr:primaryType` is a special JCR property added by the content repository, indicating the JCR primary node type.
-
-*Monitoring requests: Sling provides a simple tool (an OSGi console plugin) to monitor HTTP requests, which helps understand how things work internally. See the [Monitoring Requests](/documentation/development/monitoring-requests.html) page for details.*
-
-## Render your content using server-side javascript (ESP)
-
-Sling uses scripts or servlets to render and process content.
-
-Several scripting languages are available as additional Sling modules (packaged as OSGi *bundles* that can be installed via the Sling management console), but the launchpad currently includes the ESP (server-side ECMAscript), JSP (Java Server Pages), and Groovy language modules by default.
-
-To select a script, Sling uses the node's *sling:resourceType* property, if it is set.
-
-That is the case in our example, so the following script will be used by Sling to render the node in HTML, if the script is found at */apps/foo/bar/html.esp* in the repository.
-
-<html>
-<body>
-<h1><%= currentNode.title %></h1>
-</body>
-</html>
-
-
-To select the script, Sling:
-
-* looks under */apps*
-* and appends the *sling:resourceType* value of our node ( which is *foo/bar* )
-* and appends *html.esp*, as the extension of our URL is *html* and the language of our script is *esp*.
-
-Store this script under */apps/foo/bar/html.esp*, either using a WebDAV client (connected to [http://admin:admin@localhost:8080/](http://admin:admin@localhost:8080/)), or using cURL as shown here, after creating the *html.esp* script in the current directory on your system:
-
-
-curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo
-curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo/bar
-
-
-create a local file *html.esp* and copy above content.
-
-
-curl -u admin:admin -T html.esp http://localhost:8080/apps/foo/bar/html.esp
-
-
-The HTML rendering of your node, at [http://localhost:8080/content/mynode.html](http://localhost:8080/content/mynode.html), is now created by this ESP script. You should see the node's title alone as an <h1> element in that page.
-
-A script named *POST.esp* instead of *html.esp* would be called for a POST request, *DELETE.esp* for DELETE, *xml.esp* for a GET request with a *.xml* extension, etc. See [URL to Script Resolution](/documentation/the-sling-engine/url-to-script-resolution.html) on the Sling wiki for more info.
-
-Servlets can also be easily "wired" to handle specific resource types, extensions, etc., in the simplest case by using SCR annotations in the servlet source code. Servlets and scripts are interchangeable when it comes to processing Sling requests.
-
-
-## What next?
-
-These simple examples show how Sling uses scripts to work with JCR data, based
-on *sling:resourceType* or node types.
-
-There's much more to Sling of course - you'll find some additional simple examples below, as
-well as above in the *see also* section.
-
-## Additional examples
-
-### Let Sling generate the path of a newly created node.
-
-To create a node with a unique path at a given location, end the URL of the POST request with */*.
-
-In this case, the Sling response redirects to the URL of the created node.
-
-Start by creating a new */blog* folder:
-
-
-curl -X POST -u admin:admin "http://localhost:8080/content/blog"
-
-
-And create a node with a Sling-generated name under it:
-
-
-curl -D - -u admin:admin -F"title=Adventures with Sling" "http://localhost:8080/content/blog/"
-
-
-Using cURL's *-D* option shows the full HTTP response, which includes a *Location* header to indicate where the new node was created:
-
-
-Location: /blog/adventures_with_slin
-
-
-The actual node name might not be *adventures_with_slin* - depending on existing content in your repository, Sling will find a unique name for this new node, based on several well-know property values like title, description, etc. which are used for this if provided.
-
-So, in our case, our new node can be displayed in HTML via the [http://localhost:8080/blog/adventures_with_slin.html](http://localhost:8080/blog/adventures*with*slin.html) URL.
-
-Note that we didn't set a *sling:resourceType* property on our node, so if you want to render that node with a script, you'll have to store the script under */apps/nt/unstructured/html.esp*.
-
-
-### Add a page header with sling.include
-
-The *sling.include* function can be called from scripts to include the rendered result of another node.
-
-In this example, we create a node at */content/header*, rendered with a logo using an *html.esp* script, then use that header at the top of the *html.esp* script that we created previously for the *foo/bar* resource type.
-
-Start by checking that [http://localhost:8080/content/mynode.html](http://localhost:8080/content/mynode.html) is rendered using the *html.esp* script created above.
-
-Create this script and name it *header.esp*:
-
-<div>
-<p style="color:blue;">
-<img src="/images/sling.jpg" align="right"/>
-<%= currentNode.headline %>
-</p>
-</div>
-
-
-Upload it so that it is used to render resources having *sling:resourceType=foo/header*:
-
-
-curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo/header/
-curl -u admin:admin -T header.esp http://localhost:8080/apps/foo/header/html.esp
-
-
-Create the header node:
-
-
-curl -u admin:admin -F"sling:resourceType=foo/header" -F"headline=Hello, Sling world" http://localhost:8080/content/header
-
-
-Upload the logo that the script uses (using sling.jpg or another logo in the current directory):
-
-
-curl -X MKCOL -u admin:admin http://localhost:8080/images/
-curl -u admin:admin -T sling.jpg http://localhost:8080/images/sling.jpg
-
-
-And check that the header is rendered with the logo at [http://localhost:8080/content/header.html](http://localhost:8080/content/header.html).
-
-Now, update the html.esp script that we created for our first example above, to include the header:
-
-<html>
-<body>
-<div id="header">
-<% sling.include("/content/header"); %>
-</div>
-<h1><%= currentNode.title %></h1>
-</body>
-</html>
-
-
-And upload it again to replace the previous version:
-
-
-curl -u admin:admin -T html.esp http://localhost:8080/apps/foo/bar/html.esp
-
-
-The [http://localhost:8080/content/mynode.html](http://localhost:8080/content/mynode.html), once refreshed, now shows the blue headline and logo, and this layout also applies to any node created with *sling:resourceType=foo/bar*.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/legacy/logging.md
----------------------------------------------------------------------
diff --git a/content/documentation/legacy/logging.md b/content/documentation/legacy/logging.md
deleted file mode 100644
index 021fcde..0000000
--- a/content/documentation/legacy/logging.md
+++ /dev/null
@@ -1,112 +0,0 @@
-title=Logging
-type=page
-status=published
-~~~~~~
-
-<div class="note">
-This document is for 3.x release of Sling Commons Log components. Refer to
-<a href="http://sling.apache.org/documentation/development/logging.html">Logging</a> for documentation related
-to newer version.
-</div>
-
-## Introduction
-
-Logging in Sling is supported by the `org.apache.sling.commons.log` bundle, which is one of the first bundles installed and started by the Sling Launcher. The `org.apache.sling.commons.log` bundle has the following tasks:
-
-* Implements the OSGi Log Service Specification and registers the `LogService` and `LogReader` services
-* Exports three commonly used logging APIs:
-* [Simple Logging Facade for Java (SLF4J)](http://www.slf4j.org)
-* [Apache Commons Logging](http://jakarta.apache.org/commons/logging)
-* [log4j](http://logging.apache.org/log4j/index.html)
-* [java.util.logging](http://download.oracle.com/javase/6/docs/api/java/util/logging/package-summary.html) (as of r1169918)
-* Configures logging through our own implementation of the SLF4J backend API
-
-
-## Initial Configuration
-
-The `org.apache.sling.commons.log` bundle gets the initial configuration from the following `BundleContext` properties:
-
-
-| Property | Default | Description |
-|--|--|--|
-| `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.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.number` | 5 | The number of rotated files to keep. |
-| `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.pattern` | {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* [{2}]({{ refs.-2.path }}) {3} {5} | The `MessageFormat` pattern to use for formatting log messages with the root logger. |
-| `org.apache.sling.commons.log.julenabled` | n/a | Enables the `java.util.logging` support. |
-
-
-## User Configuration
-
-User Configuration after initial configuration is provided by the Configuration Admin Service. To this avail two `org.osgi.services.cm.ManagedServiceFactory` services are registered under the PIDs `org.apache.sling.commons.log.LogManager.factory.writer` and `org.apache.sling.commons.log.LogManager.factory.config` which may receive configuration.
-
-
-### Logger Configuration
-
-Loggers (or Categories) can be configured to log to specific files at specific levels using configurable patterns. To this avail factory configuration instances with factory PID `org.apache.sling.commons.log.LogManager.factory.config` may be created and configured with the Configuration Admin Service.
-
-The following properties may be set:
-
-| Property | Type | Default | Description |
-|--|--|--|--|
-| `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}]({{ refs.-2.path }}) {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. |
-
-
-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
-
-Log Writer Configuration is used to setup file output and log file rotation characteristics for log writers used by the Loggers.
-
-The following properties may be set:
-
-| Property | Default | Description |
-|--|--|--|
-| `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.number` | 5 | The number of rotated files to keep. |
-| `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. |
-
-See the section *Log File Rotation* below for full details on the `org.apache.sling.commons.log.file.size` and `org.apache.sling.commons.log.file.number` properties.
-
-
-
-## Log File Rotation
-
-Log files can grow rather quickly and fill up available disk space. To cope with this growth log files may be rotated in two ways: At specific times or when the log file reaches a configurable size. The first method is called *Scheduled Rotation* and is used by specifying a `SimpleDateFormat` pattern as the log file "size". The second method is called *Size Rotation* and is used by setting a maximum file size as the log file size.
-
-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
-
-The rolling schedule is specified by setting the `org.apache.sling.commons.log.file.size` property to a `java.text.SimpleDateFormat` pattern. Literal text (such as a leading dot) to be included must be *enclosed* within a pair of single quotes. A formatted version of the date pattern is used as the suffix for the rolled file name.
-
-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.
-
-It is possible to specify monthly, weekly, half-daily, daily, hourly, or minutely rollover schedules.
-
-| DatePattern | Rollover schedule | Example |
-|--|--|--|
-| `'.'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-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-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-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-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-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.|
-
-Do not use the colon ":" character in anywhere in the pattern option. The text before the colon is interpeted as the protocol specificaion of a URL which is probably not what you want.
-
-Note that Scheduled Rotation ignores the `org.apache.sling.commons.log.file.number` property since the old log files are not numbered but "dated".
-
-
-### Size Rotation
-
-Log file rotation by size is specified by setting the `org.apache.sling.commons.log.file.size` property to a plain number or a number plus a size multiplier. The size multiplier may be any of `K`, `KB`, `M`, `MB`, `G`, or `GB` where the case is ignored and the meaning is probably obvious.
-
-When using Size Rotation, the `org.apache.sling.commons.log.file.number` defines the number of old log file generations to keep. For example to keep 5 old log files indexed by 0 through 4, set the `org.apache.sling.commons.log.file.number` to `5` (which happens to be the default).
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/pax-exam-utils.md
----------------------------------------------------------------------
diff --git a/content/documentation/pax-exam-utils.md b/content/documentation/pax-exam-utils.md
deleted file mode 100644
index 49dbad7..0000000
--- a/content/documentation/pax-exam-utils.md
+++ /dev/null
@@ -1,14 +0,0 @@
-title=Sling Pax Exam Utilities
-type=page
-status=published
-~~~~~~
-
-Utilities to help testing Sling components with Pax Exam are available at
-[https://svn.apache.org/repos/asf/sling/trunk/testing/sling-pax-util](https://svn.apache.org/repos/asf/sling/trunk/testing/sling-pax-util)
-
-The focus is on making it easier to test Sling components against a full Sling launchpad,
-with minimal boilerplate code.
-
-See the
-[SlingRepositoryTest](https://svn.apache.org/repos/asf/sling/trunk/testing/sling-pax-util/src/test/java/org/apache/sling/paxexam/util/SlingRepositoryTest.java) class
-for an example test.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/the-sling-engine.md
----------------------------------------------------------------------
diff --git a/content/documentation/the-sling-engine.md b/content/documentation/the-sling-engine.md
deleted file mode 100644
index 933937e..0000000
--- a/content/documentation/the-sling-engine.md
+++ /dev/null
@@ -1,33 +0,0 @@
-title=The Sling Engine
-type=page
-status=published
-~~~~~~
-
-## General
-
-* [Architecture](/documentation/the-sling-engine/architecture.html)
-* [Authentication](/documentation/the-sling-engine/authentication.html)
-* [{{ refs.service-authentication.headers.title }}](/documentation/the-sling-engine/service-authentication.html)
-
-## Request Handling
-
-* [Dispatching Requests](/documentation/the-sling-engine/dispatching-requests.html)
-* [URL decomposition](/documentation/the-sling-engine/url-decomposition.html)
-* [URL to Script Resolution](/documentation/the-sling-engine/url-to-script-resolution.html)
-* [Request Listeners](/documentation/the-sling-engine/request-listeners.html)
-* [Filters](/documentation/the-sling-engine/filters.html)
-* [Servlets and Scripts](/documentation/the-sling-engine/servlets.html)
-* [Errorhandling](/documentation/the-sling-engine/errorhandling.html)
-* [Request Parameters](/documentation/the-sling-engine/request-parameters.html)
-
-## Resources
-
-* [Resources](/documentation/the-sling-engine/resources.html)
-* [Sling API CRUD Support](/documentation/the-sling-engine/sling-api-crud-support.html)
-* [Wrap or Decorate Resources](/documentation/the-sling-engine/wrap-or-decorate-resources.html)
-* [Mappings for Resource Resolution](/documentation/the-sling-engine/mappings-for-resource-resolution.html)
-
-## Misc
-
-* [Adapters](/documentation/the-sling-engine/adapters.html)
-* [{{ refs.featureflags.headers.title }}](/documentation/the-sling-engine/featureflags.html)
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/the-sling-engine/adapters.md
----------------------------------------------------------------------
diff --git a/content/documentation/the-sling-engine/adapters.md b/content/documentation/the-sling-engine/adapters.md
deleted file mode 100644
index c56ba98..0000000
--- a/content/documentation/the-sling-engine/adapters.md
+++ /dev/null
@@ -1,157 +0,0 @@
-title=Adapters
-type=page
-status=published
-~~~~~~
-
-[TOC]
-
-The `Resource` and `ResourceResolver` interfaces are defined with a method `adaptTo`, which adapts the object to other classes. Using this mechanism the JCR session of the resource resolver calling the `adaptTo` method with the `javax.jcr.Session` class object. Likewise the JCR node on which a resource is based can be retrieved by calling the `Resource.adaptTo` method with the `javax.jcr.Node` class object.
-
-To use resources as scripts, the `Resource.adaptTo` method must support being called with the `org.apache.sling.api.script.SlingScript` class object. But of course, we do not want to integrate the script manager with the resource resolver. To enable adapting objects to classes which are not foreseen by the original implementation, a factory mechanism is used. This way, the script manager can provide an adapter factory to adapt `Resource` to `SlingScript` objects.
-
-
-# Adaptable
-
-The `Adaptable` interface defines the API to be implemented by a class providing adaptability to another class. The single method defined by this interface is
-
-
-/**
-* Adapts the adaptable to another type.
-* <p>
-* Please not that it is explicitly left as an implementation detail whether
-* each call to this method with the same <code>type</code> yields the same
-* object or a new object on each call.
-* <p>
-* Implementations of this method should document their adapted types as
-* well as their behaviour with respect to returning newly created or not
-* instance on each call.
-*
-* @param <AdapterType> The generic type to which this resource is adapted
-* to
-* @param type The Class object of the target type, such as
-* <code>javax.jcr.Node.class</code> or
-* <code>java.io.File.class</code>
-* @return The adapter target or <code>null</code> if the resource cannot
-* adapt to the requested type
-*/
-<AdapterType> AdapterType adaptTo(Class<AdapterType> type);
-
-
-This method is called to get a view of the same object in terms of another class. Examples of implementations of this method are the Sling `ResourceResolver` implementation providing adapting to a JCR session and the Sling JCR based `Resource` implementation providing adapting to a JCR node.
-
-# Listing Adaptation Possibilities
-
-The Web Console Plugin at `/system/console/adapters` and at `/system/console/status-adapters` can be used to list all existing adaptables in the system with their according adapter classes.
-
-The web console plugin evaluates metadata being provided by any `AdapterFactory` services as well as metadata being provided through the file `SLING-INF/adapters.json`
-
-# Implementing Adaptable
-
-Each adaptable should derive from `SlingAdaptable` to automatically profit from all according `AdapterFactories` registered in the system.
-In case the `adaptTo(...)` method is being overwritten an according `SLING-INF/adapters.json` should be included in the providing bundle
-listing all adaptation possibilities. While this file is not strictly necessary for the actual adaptation to work, it provides useful information to the Web Console plugin.
-Otherwise developers will not know which adaptations are supported. The format of this JSON file looks like this ([SLING-2295](https://issues.apache.org/jira/browse/SLING-2295)):
-
-{
-<fully qualified class name of adaptable> : {
-<condition> : <fully qualified class name of adapter, may be a JSON array>
-}
-}
-
-For example
-
-{
-"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"
-],
-"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"
-}
-}
-
-Instead of manually creating that JSON file, the annotations from the module [adapter-annotations](https://svn.apache.org/viewvc/sling/trunk/tooling/maven/adapter-annotations/) can be used together with the goal `generate-adapter-metadata` from the [Maven Sling Plugin](http://sling.apache.org/components/maven-sling-plugin/generate-adapter-metadata-mojo.html) to generate it automatically ([SLING-2313](https://issues.apache.org/jira/browse/SLING-2313)).
-
-
-# Extending Adapters
-
-Sometimes an `Adaptable` implementation cannot foresee future uses and requirements. To cope with such extensibility requirements two interfaces and an abstract base class are defined:
-
-* `AdapterManager`
-* `AdapterFactory`
-* `SlingAdaptable`
-
-
-## AdapterFactory
-
-The `AdapterFactory` interface defines the service interface and API for factories supporting extensible adapters for `SlingAdaptable` objects. The interface has a single method:
-
-
-/**
-* Adapt the given object to the adaptable type. The adaptable object is
-* guaranteed to be an instance of one of the classes listed in the
-* {@link #ADAPTABLE_CLASSES} services registration property. The type
-* parameter is one of the classes listed in the {@link #ADAPTER_CLASSES}
-* service registration properties.
-* <p>
-* This method may return <code>null</code> if the adaptable object cannot
-* be adapted to the adapter (target) type for any reason. In this case, the
-* implementation should log a message to the log facility noting the cause
-* for not being able to adapt.
-* <p>
-* Note that the <code>adaptable</code> object is not required to implement
-* the <code>Adaptable</code> interface, though most of the time this method
-* is called by means of calling the {@link Adaptable#adaptTo(Class)}
-* method.
-*
-* @param <AdapterType> The generic type of the adapter (target) type.
-* @param adaptable The object to adapt to the adapter type.
-* @param type The type to which the object is to be adapted.
-* @return The adapted object or <code>null</code> if this factory instance
-* cannot adapt the object.
-*/
-<AdapterType> AdapterType getAdapter(Object adaptable,
-Class<AdapterType> type);
-
-
-Implementations of this interface are registered as OSGi services providing two lists: The list of classes which may be adapted (property named `adaptables`) and the list of classes to which the adapted class may be adapted (property named `adapters`). A good example of an Class implementing `AdapterFactory` is the `SlingScriptAdapterFactory`. In addition a property named `adapter.condition` can be provided which is supposed to contain a string value explaining under which circumstances the adaption will work (if there are any restrictions). This is evaluated by the Web Console Plugin.
-
-`AdapterFactory` services are gathered by a `AdapterManager` implementation for use by consumers. Consumers should not care for `AdapterFactory` services.
-
-
-## AdapterManager
-
-The `AdapterManager` is defines the service interface for the generalized and extensible use of `AdapterFactory` services. Thus the adapter manager may be retrieved from the service registry to try to adapt whatever object that needs to be adapted - provided appropriate adapters exist.
-
-The `AdapterManager` interface is defined as follows:
-
-
-/**
-* Returns an adapter object of the requested <code>AdapterType</code> for
-* the given <code>adaptable</code> object.
-* <p>
-* The <code>adaptable</code> object may be any non-<code>null</code> object
-* and is not required to implement the <code>Adaptable</code> interface.
-*
-* @param <AdapterType> The generic type of the adapter (target) type.
-* @param adaptable The object to adapt to the adapter type.
-* @param type The type to which the object is to be adapted.
-* @return The adapted object or <code>null</code> if no factory exists to
-* adapt the <code>adaptable</code> to the <code>AdapterType</code>
-* or if the <code>adaptable</code> cannot be adapted for any other
-* reason.
-*/
-<AdapterType> AdapterType getAdapter(Object adaptable,
-Class<AdapterType> type);
-
-
-Any object can theoretically be adapted to any class even if it does not implement the `Adaptable` interface, if an `AdapterFactory` service delivers a `getAdapter()` method which adapts an object to another one. To check if there's any existing `AdapterFactory` which can adapt a given object to another one the `AdapterManager` service with its `getAdapter()` method does the job. So the `Adaptable` interface merely is an indicator that the object provides built-in support for being adapted.
-
-
-## SlingAdaptable
-
-The `SlingAdaptable` class is an implementation of the `Adaptable` interface which provides built-in support to call the `AdapterManager` to provide an adapter from the `Adaptable` object to the requested class.
-
-An example of extending the `SlingAdaptable` class will be the Sling JCR based `Resource` implementation. This way, such a resource may be adapted to a `SlingScript` by means of an appropriately programmed `AdapterFactory` (see below).
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/the-sling-engine/architecture.md
----------------------------------------------------------------------
diff --git a/content/documentation/the-sling-engine/architecture.md b/content/documentation/the-sling-engine/architecture.md
deleted file mode 100644
index d0cb977..0000000
--- a/content/documentation/the-sling-engine/architecture.md
+++ /dev/null
@@ -1,98 +0,0 @@
-title=Architecture
-type=page
-status=published
-~~~~~~
-
-The following is a short list of high-lights of Sling:
-
-* **[OSGi](#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](#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](#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](#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)** — Servlets and Scripts are handled uniformly in that they are represented as resources themselves and are accessible by a resource path.
-* **[Launchpad](#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.
-
-The following sections elaborate on each of these highlights.
-
-## OSGi
-
-[OSGi](http://www.osgi.org) is a consortium that has developed a specification to build modular and extensible applications. This offers [various benefits](http://www.osgi.org/About/WhyOSGi). We deal mainly with two parts of the specifications: The Core Specification, which defines the OSGi Framework and Core Services, and the Compendium Services Specification, which defines a host of services that extend the functionality of the OSGi Framework.
-
-### 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:
-
-* **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.
-
-
-### Compendium Services
-
-Based on the OSGi Framework specification, the Compendium Services specification defines a (growing) number of extension services, which may be used by applications for various tasks. Of these Compendium Services, Sling is using just a small number:
-
-* **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.
-
-
-## Sling API
-
-The Sling API is an extension to the Servlet API which provides more functionality to interact with the Sling framework and also to extend Sling itself and to implement Sling applications.
-
-See the [Sling API]({{ refs.sling-api.path }}) page for more information.
-
-
-## Request Processing
-
-Traditional Web Application framework emply more or less elaborate methods to select a Servlet or Controller based on the request URL, which in turn tries to load some data (usually from a database) to act upon and finally to render the result somehow.
-
-Sling turns this processing around in that it places the data to act upon at the center and consequently uses the request URL to first resolve the data to process. This data is internally represented as an instance of the `Resource` interface. Based on this resource as well as the request method and more properties of the request URL a script or servlet is then selected to handle the request.
-
-See the [Servlets](/documentation/the-sling-engine/servlets.html) page for more information.
-
-
-## Resources
-
-
-The Resource is one of the central parts of Sling. Extending from JCR's *Everything is Content*, Sling assumes *Everthing is a Resource*. Thus Sling is maintaining a virtual tree of resources, which is a merger of the actual contents in the JCR Repository and resources provided by so called resource providers.
-
-Each resource has a path by which it is addressed in the resource tree, a resource type and some resource metadata (such as file size, last modification time). It is important to understand, that a `Resource` instance actually is only a handle to the actual data. By virtue of the `adaptTo(Class<Type>)` method, a resource may be coerced into another data type, which may then be used while processing the request. Examples of data types are `javax.jcr.Node` and `java.io.InputStream`.
-
-See the [Resources](/documentation/the-sling-engine/resources.html) page for more information.
-
-
-## Servlets and Scripts
-
-Scripts are usually provided as content in a JCR repository. But since Sling is using a resource tree, a script actually is represented as a Resource and may be provided from within a Bundle (by virtue of the bundle resource provider) or even from the platform file system (by virtue of the file system resource provider).
-
-Accessing scripts in the resource tree, allows for a very easy to understand mapping from resource type to some script path.
-
-Having found the script resource, we still need access to the appropriate script language implementation to evaluate the script. To this avail, Sling is making use of the `Resource.adaptTo(Class<Type>)` method: If a script language implementation is available for the extension of the script name an adaptor for the script resource can be found, which handles the evaluation of the script.
-
-Besides scripting languages, such as ECMAScript, Groovy, JSP, Sling also supports regular servlets. To be able to use servlets for request processing, such servlets must be registered as OSGi services for the `javax.servlet.Servlet` interface and provide a number of service registration properties, which are used to use the servlets. In fact servlets thus registered as OSGi services are mapped into the resource tree by means of a servlet resource provider. This resource provider mapps the servlets into the resource tree using the service registration properties to build one or more resource paths for the servlet.
-
-As a result of mapping servlets into the resource tree and the possibility to adapt resource to an adaptor data type, scripts and servlets may be handled completely transparently: The servlet resolver just looks for a resource matching the resource type and adapts the resource found to `javax.jcr.Servlet`. If the resource happens to be provided by a servlet resource provider, the adapter is of course the servlet itself. If the resource happens to be a script, the adapter is a servlet facade which internally calls the script language implementation to evaluate the script.
-
-See the [Servlet Resolution]({{ refs.servlet-resolution.path }}) page for more information.
-
-
-
-## Launchpad
-
-Sling may be launched as a standalone application using the Sling Application or as a Web Application running inside any Servlet API 2.4 or newer Servlet Container.
-
-The Sling Application is a standalone Java Application which is really small: Just the main class and some glue classes. The OSGi framework as well as the OSGi API libraries are packaged as a JAR file, which is loaded through a custom classloader. This enables to update the framework and/or OSGi API libraries from within Sling by updating the system bundle.
-
-The Sling Servlet is equally small as the Sling Application. It uses the Felix `HttpService` bridge as the glue between the servlet container and the OSGi framework.
-
-As we have seen, Sling may be launched as a standalone Java Application or as a Web Application inside any compliant Servlet Container. To hide the differences of the launching mechanism, Sling internally registers a Servlet with an OSGi `HttpService`. Regardless of how Sling is launched, the Felix implementation of the OSGi `HttpService` specification is used. When Sling is launched as a standalone Java Application, Felix HttpService uses an embedded version of the Jetty servlet container. When Sling is launched as a Web Application, the Felix HttpService Bridge is used.
-
-Optionally, PAX Web's implementation of HttpService can be used when Sling is launched as a standalone Java Application. See the [Maven Launchpad Plugin](/documentation/development/maven-launchpad-plugin.html) page for information on how to do this.
-
-See [The Sling Launchpad](/documentation/the-sling-engine/the-sling-launchpad.html) for more information.
-
-
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/the-sling-engine/authentication.md
----------------------------------------------------------------------
diff --git a/content/documentation/the-sling-engine/authentication.md b/content/documentation/the-sling-engine/authentication.md
deleted file mode 100644
index f09b223..0000000
--- a/content/documentation/the-sling-engine/authentication.md
+++ /dev/null
@@ -1,29 +0,0 @@
-title=Authentication
-type=page
-status=published
-~~~~~~
-Excerpt: How requests are authenticated.
-
-
-This section describes the framework provided by Sling to authenticate HTTP requests.
-
-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 accompanyied with an implementation instance of the OSGi `HttpContext` interface, which defines a method to authenticate requests: `handleSecurity`.
-
-This method is called by the OSGi HTTP Service implementation after the servlet has been selected to handle the request but before actually calling the servlet's `service` method.
-
-<a href="authentication.png" style="float:left;padding-right:5%">
-<img src="authentication.png" title="Authentication Flow" alt="Authentication Flow" />
-</a>
-
-1. First the OSGi HTTP Service implementation is analyzing the request URL to find a match for a servlet or resource registered with the HTTP Service.
-1. Now the HTTP Service implementation has to call the `handleSecurity` method of the `HttpContext` object with which the servlet or resource has been registered. This method returns `true` if the request should be serviced. If this method returns `false` the HTTP Service implementation terminates the request sending back any response which has been prepared by the `handleSecurity` method. Note, that the `handleSecurity` method must prepare the failure response sent to the client, the HTTP Service adds nothing here. If the `handleSecurity` method is successful, it must add two (or three) request attributes described below.
-1. When the `handleSecurity` method returns `true` the HTTP Service either calls the `Servlet.service` method or sends back the requested resource depending on whether a servlet or a resource has been selected in the first step.
-
-The important thing to note here is, that at the time the `handleSecurity` method is called, the `SlingMainServlet` is not yet in control of the request. So any functionality added by the `SlingMainServlet`, notably the `SlingHttpServletRequest` and `SlingHttpServletResponse` objects are not available to the implementation of the `handleSecurity` method.
-
-The following pages describe the full details of request authentication in Sling in full detail:
-
-* [Tasks](/documentation/the-sling-engine/authentication/authentication-tasks.html): {{ refs.authentication-tasks.headers.excerpt }}
-* [Actors](/documentation/the-sling-engine/authentication/authentication-actors.html): {{ refs.authentication-actors.headers.excerpt }}
-* [Framework](/documentation/the-sling-engine/authentication/authentication-framework.html): {{ refs.authentication-framework.headers.excerpt }}
-* [AuthenticationHandler](/documentation/the-sling-engine/authentication/authentication-authenticationhandler.html): {{ refs.authentication-authenticationhandler.headers.excerpt }}
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/the-sling-engine/authentication.png
----------------------------------------------------------------------
diff --git a/content/documentation/the-sling-engine/authentication.png b/content/documentation/the-sling-engine/authentication.png
deleted file mode 100644
index d0995fe..0000000
Binary files a/content/documentation/the-sling-engine/authentication.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/the-sling-engine/authentication/authentication-actors.md
----------------------------------------------------------------------
diff --git a/content/documentation/the-sling-engine/authentication/authentication-actors.md b/content/documentation/the-sling-engine/authentication/authentication-actors.md
deleted file mode 100644
index 63a44f9..0000000
--- a/content/documentation/the-sling-engine/authentication/authentication-actors.md
+++ /dev/null
@@ -1,63 +0,0 @@
-title=Authentication - Actors
-type=page
-status=published
-~~~~~~
-Excerpt: The authentication process involves a number of actors contributing to the concepts, the API and the particular implementations.
-
-The authentication process involves a number of actors contributing to the concepts, the API and the particular implementations.
-
-
-## OSGi Http Service Specification
-
-The main support for authentication is defined by the OSGi Http Service specification. This specification defines how an OSGi application can register servlets and resources to build web applications. As part of the servlet and/or resource registration a `HttpContext` may be provided, which allows for additional support.
-
-The main method of interest to the authentication process is the `handleSecurity` method. This is called by the OSGi Http Service implementation before the registered servlet is called. Its intent is to authenticate the request and to provide authentication information for the request object: the authentication type and the remote user name.
-
-The Sling Auth Core bundle provides the `AuthenticationSupport` service which may be used to the implement the `HttpContext.handleSecurity` method.
-
-
-## Sling Engine
-
-The Sling Engine implements the main entry point into the Sling system by means of the `SlingMainServlet`. This servlet is registered with the OSGi Http Service and provides a custom `HttpContext` whose `handleSecurity` method is implemented by the `AuthenticationSupport` service.
-
-When the request hits the `service` method of the Sling Main Servlet, the resource resolver provided by the `AuthenticationSupport` service is retrieved from the request attributes and used as the resource resolver for the request.
-
-That's all there is for the Sling Engine to do with respect to authentication.
-
-
-## Sling Auth Core
-
-The support for authenticating client requests is implemented in the Sling Auth Core bundle. As such this bundle provides three areas of support
-
-* `AuthenticationHandler` service interface. This is implemented by services providing functionality to extract credentials from HTTP requests.
-* `Authenticator` service interface. This is implemented by the `SlingAuthenticator` class in the Sling Auth Core bundle and provides applications with entry points to login and logout.
-* `AuthenticationSupport` service interface. This is implemented by the `SlingAuthenticator` class in the Sling Auth Core bundle and allows applications registering with the OSGi HTTP Service to make use of the Sling authentication infrastructure.
-
-
-## JCR Repository
-
-The actual process of logging into the repository and provided a `Session` is implementation dependent. In the case of Jackrabbit extensibility is provided by configuration of the Jackrabbit repository by means of an interface and two helper classes:
-
-* `LoginModule` -- The interface to be implemented to provide login processing plugins
-* `AbstractLoginModule` -- A an abstract base class implementation of the `LoginModule` interface.
-* `DefaultLoginModule` -- The default implementation of the `AbstractLoginModule` provided by Jackabbit. This login module takes `SimpleCredentials` and uses the repository to lookup the users, validate the credentials and providing the `Principal` representing the user towards the repository.
-
-The Sling Jackrabbit Embedded Repository bundle provides additional plugin interfaces to extend the login process dynamically using OSGi services. To this avail the bundle configures a `LoginModule` with the provided default Jackrabbit configuration supporting these plugins:
-
-* `LoginModulePlugin` -- The main service interface. Plugins must implement this interface to be able to extend the login process. See for example the [Sling OpenID authentication handler](http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/openid/), which implements this interface to support OpenID authentication.
-* `AuthenticationPlugin` -- Helper interface for the `LoginModulePlugin`.
-
-
-## Sling Applications
-
-Sling Applications requiring authenticated requests should not care about how authentication is implemented. To support such functionality the `Authenticator` service is provided with two methods:
-
-* `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.
-
-Sling Applications should never directly use any knowledge of any authentication handler or directly call into an authentication handler. This will certainly break the application and cause unexpected behaviour.
-
-<div class="info">
-If you want to know whether a request is authenticated or not, you can inspect the result of the <code>HttpServletRequest.getAuthType</code> method: If this method returns <code>null</code> the request is not authenticated.
-</div>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler.md
----------------------------------------------------------------------
diff --git a/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler.md b/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler.md
deleted file mode 100644
index 52fecf9..0000000
--- a/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler.md
+++ /dev/null
@@ -1,56 +0,0 @@
-title=Authentication - AuthenticationHandler
-type=page
-status=published
-~~~~~~
-Excerpt: The `AuthenticationHandler` interface defines the service API which may be implemented by authentication handlers registered as OSGi services.
-
-The `AuthenticationHandler` interface defines the service API which may be implemented by authentication handlers registered as OSGi services.
-
-`AuthenticationHandler` services have a single required service registration property which is used to identify requests to which the `AuthenticationHandler` service is applicable:
-
-| Property | Description |
-|-|-|
-| `path` | One or more (array or vector) string values indicating the request URLs to which the `AuthenticationHandler` is applicable. |
-| `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. |
-
-Each path may be an absolute URL, an URL with just the host/port and path or just a plain absolute path:
-
-| URL part | Scheme | Host/Port | 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 |
-
-When looking for an `AuthenticationHandler` the authentication handler is selected whose path is the longest match on the request URL. If the service is registered with Scheme and Host/Port, these must exactly match for the service to be eligible. If multiple `AuthenticationHandler` services are registered with the same length matching path, the handler with the higher service ranking is selected[^ranking].
-
-[^ranking]: Service ranking is defined by the OSGi Core Specification as follows: *If multiple qualifying service interfaces exist, a service with the highest `service.ranking` number, or when equal to the lowest `service.id`, determines which service object is returned by the Framework*.
-
-The value of `path` service registration property value triggering the call to any of the `AuthenticationHandler` methods is available as the `path` request attribute (for the time of the method call only). If the service is registered with multiple path values, the value of the `path` request attribute may be used to implement specific handling.
-
-
-### Implementations provided by Sling
-
-* [Form Based AuthenticationHandler](/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.html)
-* [OpenID AuthenticationHandler](/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.html)
-
-### Sample implementations
-
-
-#### HTTP Basic Authentication Handler
-
-* `extractCredentials` -- Get user name and password from the `Authorization` HTTP header
-* `requestCredentials` -- Send a 401/UNAUTHORIZED status with `WWW-Authenticate` response header setting the Realm
-* `dropCredentials` -- Send a 401/UNAUTHORIZED status with `WWW-Authenticate` response header setting the Realm
-
-Interestingly the `dropCredentials` method is implemented in the same way as the `requestCredentials` method. The reason for this is, that HTTP Basic authentication does not have a notion of login and logout. Rather the request is accompanied with an `Authorization` header or not. The contents of this header is usually cached by the client browser. So logout is actually simulated by sending a 401/UNAUTHORIZED status thus causing the client browser to clear the cache and ask for user name and password.
-
-
-#### Form Based Authentication Handler
-
-
-* `extractCredentials` -- Get user name and password with the help of a special cookie (note, that of course the cookie should not contain this data, but refer to it in an internal store of the authentication handler). If the cookie is not set, check for specific login parameters to setup the cookie.
-* `requestCredentials` -- Send the login form for the user to provide the login parameters.
-* `dropCredentials` -- Clear the authentication cookie and internal store.
-
-
-///Footnotes Go Here///
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.md
----------------------------------------------------------------------
diff --git a/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.md b/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.md
deleted file mode 100644
index 8f1ee41..0000000
--- a/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.md
+++ /dev/null
@@ -1,121 +0,0 @@
-title=Form Based AuthenticationHandler
-type=page
-status=published
-~~~~~~
-
-[TOC]
-
-The Form Based AuthenticationHandler has two authentication phases: The first phase is presenting a login form to the user and passing the entered user name and password to the server. The second phase is storing successful authentication in a Cookie or an HTTP Session.
-
-The implementation of the Form Based Authentication Handler follows the guidelines of the Servlet API 2.4 specification for *Form Based Authentication* in section SRV.12.5.3. Specifically the following requirements are implemented:
-
-* For the initial form submission, the request URL must end with `/j_security_check` and the user name and password names must be `j_username` and `j_password`, resp.
-* The authentication type as returned by `HttpServletRequest.getAuthType()` is set to `HttpServletRequest.FORM_AUTH`.
-
-The Form Based Authentication Handler is maintained in the [Sling SVN](http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/form)
-
-
-### AuthenticationHandler implementation
-
-
-* `extractCredentials` -- Prepares credentials for the form entered data or from the Cookie or HTTP Session attribute. Returns `null` if neither data is provided in the request
-* `requestCredentials` -- Redirects the client (browser) to the login form
-* `dropCredentials` -- Remove the Cookie or remove the HTTP Session attribute
-
-
-### AuthenticationFeedbackHandler implementation
-
-* `authenticationFailed` -- Remove the Cookie or remove the HTTP Session attribute
-* `authenticationSucceeded` -- Set (or update) the Cookie or HTTP Session attribute
-
-
-### Phase 1: Form Submission
-
-
-The login form submitted in phase 1 to validate the user name and password must be provided in an HTTP `POST` request to an URL whose last segment is `j_security_check`. The request is ignored as a form submission if either the method is not `POST` or the last segment is no `j_security_check`.
-
-The form is rendered by redirecting the client to the URL indicated by the `form.login.form` configuration parameter. This redirection request may accompanyied by the following parameters:
-
-* `resource` -- The resource to which the user should be redirected after successful login. This request parameter should be submitted back to the server as the `resource` parameter.
-* `j_reason` -- This parameter indicates the reason for rendering the login form. If this parameter is set, it is set to `INVALID_CREDENTIALS` indicating a previous form submission presented invalid username and password or `TIMEOUT` indicating a login session has timed out. The login form servlet/script can present the user with an appropriate message.
-
-The Form Based Authentication Handlers supports the following request parameters submitted by the HTML form:
-
-* `j_username` -- Name of the user to authenticate
-* `j_password` -- Password to authenticate the user
-* `j_validate` -- Flag indicating whether to just validate the credentials
-* `resource` -- The location to go to on successful login
-* `sling.auth.redirect` -- The location to redirect to on successful login
-
-The `j_username` and `j_password` parameters are used to create a JCR `SimpleCredentials` object to log into the JCR Repository.
-
-The `j_validate` parameter may be used to implement login form submission using AJAX. If this parameter is set to `true` (case-insensitive) the credentials are used to login and after success or failure to return a status code:
-
-| Status | Description |
-|--|--|
-| `200 OK` | Authentication succeeded; credentials are valid for login; the Cookie or HTTP Session attribute is now set |
-| `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) |
-
-If the `j_validate` parameter is not set or is set to any value other than `true`, the request processing depends on authentication success or failure:
-
-| Authentication | Description |
-|--|--|
-| Success | Client is redirected to the authenticated resource; the Cookie or HTTP Session attribute is now set. |
-| 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) |
-
-The `resource` and `sling.auth.redirect` parameters provide similar functionality but with differing historical backgrounds. The `resource` parameter is based on the `resource` request attribute which is set by the login servlet to indicate the original target resource the client desired when it was forced to authenticate. The `sling.auth.redirect` parameter can be used by clients (applications like cURL or plain HTML forms) to request being redirected after successful login. If both parameters are set, the `sling.auth.redirect` parameter takes precedence.
-
-The Form Based Authentication Handler contains a [default form servlet](http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/AuthenticationFormServlet.java) and [HTML form template](http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/form/src/main/resources/org/apache/sling/auth/form/impl/login.html).
-
-
-### Phase 2: Authenticated Requests
-
-
-After the successful authentication of the user in phase 1, the authentication state is stored in a Cookie or an HTTP Session. The stored value is a security token with the following contents:
-
-
-HmacSHA1(securetoken, <securetokennumber><expirytime>@<userID>)@<securetokennumber><expirytime>@<userID>
-
-
-The `securetoken` and `securetokennumber` are related in that an table of secure tokens is maintained where the `securetoken` is an entry in the table and the `securetokennumber` is the index in of the token in the table.
-
-The secure tokens are refreshed periodically causing the authentication state stored in the Cookie or the HTTP Session to be updated peridocally. This periodic update has two advantages:
-
-* Login sessions time out after some period of inactivity: If a request is handled for an authentication state whose expiry time has passed, the request is considered unauthenticated.
-* If a Cookie would be stolen or an HTTP Session be hijacked, the authentication state expires within a reasonable amount of time to try to prevent stealing the authentication.
-
-The authentication state may be transmitted with a Cookie which is configured as follows:
-
-* *Cookie Path* -- Set to the servlet context path
-* *Domain* -- See below
-* *Age* -- Set to -1 to indicate a session Cookie
-* *Secure* -- Set to the value returned by the `ServletRequest.isSecure()` method
-
-If the authentication state is kept in an HTTP Session the setup of the session ID cookie is maintained by the servlet container and is outside of the control of the Form Based AuthenticationHandler.
-
-
-### Configuration
-
-The Form Based Authentication Handler is configured with configuration provided by the OSGi Configuration Admin Service using the `org.apache.sling.formauth.FormAuthenticationHandler` service PID.
-
-| Parameter | Default | Description |
-|--|--|--|
-| `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.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.name` | `sling.formauth` | The name of the Cookie or HTTP Session attribute providing the authentication state. |
-| `form.auth.timeout` | `30` |The number of minutes after which a login session times out. This value is used as the expiry time set in the authentication data. |
-| `form.credentials.name` | `sling.formauth` | The name of the `SimpleCredentials` attribute used to provide the authentication data to the `LoginModulePlugin`. |
-| `form.token.file` | `cookie-tokens.bin` | The name of the file used to persist the security tokens. |
-| `form.default.cookie.domain` | | The domain on which cookies will be set, unless overridden in the `AuthenticationInfo` object. |
-
-*Note:* The `form.token.file` parameter currently refers to a file stored in the file system. If the path is a relative path, the file is either stored in the Authentication Handler bundle private data area or -- if not possible -- below the location indicated by the `sling.home` framework property or -- if `sling.home` is not set -- the current working directory. In the future this file may be store in the JCR Repository to support clustering scenarios.
-
-
-### Security Considerations
-
-Form Based Authentication has some limitations in terms of security:
-
-1. User name and password are transmitted in plain text in the initial form submission.
-1. The Cookie used to provide the authentication state or the HTTP Session ID may be stolen.
-
-To prevent eavesdroppers from sniffing the credentials or stealing the Cookie a secure transport layer should be used such as TLS/SSL, VPN or IPSec.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.md
----------------------------------------------------------------------
diff --git a/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.md b/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.md
deleted file mode 100644
index 09f6dab..0000000
--- a/content/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.md
+++ /dev/null
@@ -1,134 +0,0 @@
-title=OpenID AuthenticationHandler
-type=page
-status=published
-~~~~~~
-
-[TOC]
-
-The OpenID Authentication Handler supports authentication of request users using the [OpenID](http://www.openid.net) authentication protocol. If the user has successfully authenticated with his OpenID provider a signed OpenID identity is further used to identify the user.
-
-Since generally an OpenID identity is an URL and URLs may not be used as JCR user names, an association mechanism is used by the OpenID authentication handler to associate an OpenID identity with an existing JCR user: The OpenID identity URL is set as the value of a JCR user property. When a user authenticates with his OpenID identity the matching user searched for by looking for a match in this property.
-
-*NOTE:* This association currently only works with Jackrabbit (or Jackrabbit based repositories) because user management is not part of the JCR 2 specification and the OpenID authentication handler uses the Jackrabbit `UserManager` to find users by a user property value.
-
-The OpenID Authentication Handler is maintained in the [Sling SVN](http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/openid/)
-
-
-### Credentials Extraction
-
-Theoretically each request with the `openid_identifier` request parameter set may initiate an OpenID authentication process which involves resolving the OpenID provider for the identifier and subsequently authentication with the provider authorizing the Sling instance to use the OpenID identity.
-
-This initiation, though, is not possible if the request already contains a valid and validated OpenID identifier either set as a request attribute or set in the HTTP Session or the OpenID cookie. In these situations, the current association of a client with an OpenID identity must first be removed by logging out, e.g. by requesting `/system/sling/logout.html` which causes the current OpenID user data to be removed by either removing it from the HTTP Session or by clearing the OpenID cookie.
-
-
-### Phase 1: Form Submission
-
-Requesting an OpenID identifier is initiated by the Sling Authenticator deciding, that authentication is actually required to process a request and the OpenID Authentication Handler being selected to request credentials with.
-
-In this case the OpenID authenticator causes a form to be rendered by redirecting the client to the URL indicated by the `form.login.form` configuration parameter. This redirection request may accompanied by the following parameters:
-
-| Request Parameter | Description |
-|--|--|
-| `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). |
-| `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_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. |
-
-The OpenID Authentication handlers supports the following request parameters submitted by the HTML form:
-
-* `openid_identifier` -- OpenID Claimed Identifier. This may be any actual OpenID identity URL or the URL of OpenID Provider such as https://www.google.com/accounts/o8/id, https://me.yahoo.com, or https://www.myopenid.com.
-* `sling:authRequestLogin` -- This request parameter is recommended to be set with a hidden field to the value *OpenID* to ensure the request is handled by the OpenID Authentication Handler.
-* `resource` -- The `resource` request parameter should be sent back to ensure the user is finally redirected to requested target resource after successful authentication. If this request parameter is not set, or is set to an empty string, it is assumed to be the request context root path.
-
-The OpenID Authentication Handler provides a default login form registered at `/system/sling/openid/login`.
-
-
-### Configuration
-
-The OpenID AuthenticationHandler is configured with configuration provided by the OSGi Configuration Admin Service using the `org.apache.sling.openidauth.OpenIdAuthenticationHandler` service PID.
-
-| Parameter | Default | Description |
-|--|--|--|
-| `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
-
-To extract authentication information from the request, the Sling OpenID Authentication handler considers the following information in order:
-
-1. The OpenID credentials cookie or OpenID User data in the HTTP Session (depending on the `openid.use.cookie` configuration)
-1. Otherwise the `openid_identifier` request parameter (or a different request parameter depending on the `openid.login.identifier` configuration)
-
-If the OpenID credentials already exist in the request, they are validated and returned if valid
-
-If the existing credentials fail to validate, authentication failure is assumed and the credentials are removed from the request, either by clearing the OpenID cookie or by removing the OpenID User data from the HTTP Session.
-
-If no OpenID credentials are found in the request, the request parameter is considered and if set is used to resolve the actual OpenID identity of the user. This involves redirecting the client to the OpenID provider resolved from the OpenID identifier supplied.
-
-If the supplied OpenID identifier fails to resolve to an OpenID provider or if the identifier fails to be resolved to a validated OpenID identity, authentication fails.
-
-
-#### requestCredentials
-
-If the `sling:authRequestLogin` parameter is set to a value other than `OpenID` this method immediately returns `false`.
-
-If the parameter is not set or is set to `OpenID` this method continues with first invalidating any cached OpenID credentials (same as `dropCredentials` does) and then redirecting the client to the login form configured with the `openid.login.form` configuration property. The redirect is provided with up to three request parameters:
-
-| Request Parameter | Description |
-|--|--|
-| `resource` | The location to which the user initially requested access and that caused the `requestCredentials` method to be called. |
-| `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_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. |
-
-
-
-#### dropCredentials
-
-Invalidates the OpenID identity currently stored with the request. This means to either remove the OpenID cookie or to remove the OpenID information from the HTTP Session. This method does not write to the response (except setting the `Set-Cookie` header to remove the OpenID cookie if required) and does not commit the response.
-
-
-### AuthenticationFeedbackHandler implementation
-
-#### authenticationFailed
-
-This method is called, if the Credentials provided by the Authentication Handler could not be validated by the Jackrabbit authentication infrastructure. One cause may be that the integration with Jackrabbit has not been completed (see *Integration with Jackrabbit* below). Another, more probably cause, is that the validated OpenID identifier cannot be associated with an existing JCR user.
-
-The OpenID Authentication Handler implementation of the `authenticationFailed` method sets the `j_reason` request attribute to `OpenIDFailure.REPOSITORY` and sets the `j_openid_identity` request attribute to the OpenID identity of the authenticated user.
-
-A login form provider may wish to act upon this situation and provide a login form to the user to allow to his OpenID identity with an existing JCR user.
-
-In addition, the current OpenID identity is invalidated thus the cached OpenID information is removed from the HTTP Session or the OpenID cookie is cleaned. This will allow the user to present a different OpenID identifier to retry or it will require the OpenID identity to be revalidated with the OpenID provider if the identity is associated with a JCR user.
-
-#### authenticationSucceeded
-
-The OpenID Authentication Handler implementation of the `authenticationSucceeded` method just calls the `DefaultAuthenticationFeedbackHandler.handleRedirect` method to redirect the user to the initially requested location.
-
-
-### Integration with Jackrabbit
-
-The OpenID authentication handler can be integrated in two ways into the Jackrabbit authentication mechanism which is based on JAAS `LoginModule`. One integration is by means of a `LoginModulePlugin` which plugs into the extensible `LoginModule` architecture supported by the Sling Jackrabbit Embedded Repository bundle.
-
-The other integration option is the `trusted_credentials_attribute` mechanism supported by the Jackrabbit `DefaultLoginModule`. By setting the `trusted_credentials_attribute` parameter of the Jackrabbit `DefaultLoginModule` and the `openid.user.attr` configuration property of the OpenID Authentication Handler to the same value, the existence of an attribute of that name in the `SimpleCredentials` instance provided to the `Repository.login` method signals pre-authenticated credentials, which need not be further checked by the `DefaultLoginModule`.
-
-
-### Security Considerations
-
-OpenIDAuthentication has some limitations in terms of security:
-
-1. User name and password are transmitted in plain text in the initial form submission.
-1. The Cookie used to provide the authentication state or the HTTP Session ID may be stolen.
-1. When using the `trusted_credentials_attribute` mechanism, any intruder knowing the attribute name may log into the repository as any existing JCR user. The better option is to be based on the `LoginModulePlugin` mechanism.
-
-To prevent eavesdroppers from sniffing the credentials or stealing the Cookie a secure transport layer should be used such as TLS/SSL, VPN or IPSec.
[38/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/authentication/authentication-actors.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/authentication/authentication-actors.html b/documentation/the-sling-engine/authentication/authentication-actors.html
new file mode 100644
index 0000000..cec16a4
--- /dev/null
+++ b/documentation/the-sling-engine/authentication/authentication-actors.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Authentication - Actors</h1></header><p>Excerpt: The authentication process involves a number of actors contributing to the concepts, the API and the particular implementations.</p>
+<p>The authentication process involves a number of actors contributing to the concepts, the API and the particular implementations.</p>
+<h2>OSGi Http Service Specification</h2>
+<p>The main support for authentication is defined by the OSGi Http Service specification. This specification defines how an OSGi application can register servlets and resources to build web applications. As part of the servlet and/or resource registration a <code>HttpContext</code> may be provided, which allows for additional support.</p>
+<p>The main method of interest to the authentication process is the <code>handleSecurity</code> method. This is called by the OSGi Http Service implementation before the registered servlet is called. Its intent is to authenticate the request and to provide authentication information for the request object: the authentication type and the remote user name.</p>
+<p>The Sling Auth Core bundle provides the <code>AuthenticationSupport</code> service which may be used to the implement the <code>HttpContext.handleSecurity</code> method.</p>
+<h2>Sling Engine</h2>
+<p>The Sling Engine implements the main entry point into the Sling system by means of the <code>SlingMainServlet</code>. This servlet is registered with the OSGi Http Service and provides a custom <code>HttpContext</code> whose <code>handleSecurity</code> method is implemented by the <code>AuthenticationSupport</code> service.</p>
+<p>When the request hits the <code>service</code> method of the Sling Main Servlet, the resource resolver provided by the <code>AuthenticationSupport</code> service is retrieved from the request attributes and used as the resource resolver for the request.</p>
+<p>That's all there is for the Sling Engine to do with respect to authentication.</p>
+<h2>Sling Auth Core</h2>
+<p>The support for authenticating client requests is implemented in the Sling Auth Core bundle. As such this bundle provides three areas of support</p>
+<ul>
+ <li><code>AuthenticationHandler</code> service interface. This is implemented by services providing functionality to extract credentials from HTTP requests.</li>
+ <li><code>Authenticator</code> service interface. This is implemented by the <code>SlingAuthenticator</code> class in the Sling Auth Core bundle and provides applications with entry points to login and logout.</li>
+ <li><code>AuthenticationSupport</code> service interface. This is implemented by the <code>SlingAuthenticator</code> class in the Sling Auth Core bundle and allows applications registering with the OSGi HTTP Service to make use of the Sling authentication infrastructure.</li>
+</ul>
+<h2>JCR Repository</h2>
+<p>The actual process of logging into the repository and provided a <code>Session</code> is implementation dependent. In the case of Jackrabbit extensibility is provided by configuration of the Jackrabbit repository by means of an interface and two helper classes:</p>
+<ul>
+ <li><code>LoginModule</code> -- The interface to be implemented to provide login processing plugins</li>
+ <li><code>AbstractLoginModule</code> -- A an abstract base class implementation of the <code>LoginModule</code> interface.</li>
+ <li><code>DefaultLoginModule</code> -- The default implementation of the <code>AbstractLoginModule</code> provided by Jackabbit. This login module takes <code>SimpleCredentials</code> and uses the repository to lookup the users, validate the credentials and providing the <code>Principal</code> representing the user towards the repository.</li>
+</ul>
+<p>The Sling Jackrabbit Embedded Repository bundle provides additional plugin interfaces to extend the login process dynamically using OSGi services. To this avail the bundle configures a <code>LoginModule</code> with the provided default Jackrabbit configuration supporting these plugins:</p>
+<ul>
+ <li><code>LoginModulePlugin</code> -- The main service interface. Plugins must implement this interface to be able to extend the login process. See for example the <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/openid/">Sling OpenID authentication handler</a>, which implements this interface to support OpenID authentication.</li>
+ <li><code>AuthenticationPlugin</code> -- Helper interface for the <code>LoginModulePlugin</code>.</li>
+</ul>
+<h2>Sling Applications</h2>
+<p>Sling Applications requiring authenticated requests should not care about how authentication is implemented. To support such functionality the <code>Authenticator</code> service is provided with two methods:</p>
+<ul>
+ <li>
+ <p><code>login</code> -- allows the application to ensure requests are authenticated. This involves selecting an <code>AuthenticationHandler</code> to request credentials for authentication.</p></li>
+ <li>
+ <p><code>logout</code> -- allows the application to forget about any authentication. This involves selecting an <code>AuthenticationHandler</code> to forget about credentials in the request.</p></li>
+</ul>
+<p>Sling Applications should never directly use any knowledge of any authentication handler or directly call into an authentication handler. This will certainly break the application and cause unexpected behaviour.</p>
+<div class="info">
+If you want to know whether a request is authenticated or not, you can inspect the result of the <code>HttpServletRequest.getAuthType</code> method: If this method returns <code>null</code> the request is not authenticated.
+</div></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/authentication/authentication-authenticationhandler.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/authentication/authentication-authenticationhandler.html b/documentation/the-sling-engine/authentication/authentication-authenticationhandler.html
new file mode 100644
index 0000000..8ab1b7d
--- /dev/null
+++ b/documentation/the-sling-engine/authentication/authentication-authenticationhandler.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Authentication - AuthenticationHandler</h1></header><p>Excerpt: The <code>AuthenticationHandler</code> interface defines the service API which may be implemented by authentication handlers registered as OSGi services.</p>
+<p>The <code>AuthenticationHandler</code> interface defines the service API which may be implemented by authentication handlers registered as OSGi services.</p>
+<p><code>AuthenticationHandler</code> services have a single required service registration property which is used to identify requests to which the <code>AuthenticationHandler</code> service is applicable:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Property </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>path</code> </td>
+ <td>One or more (array or vector) string values indicating the request URLs to which the <code>AuthenticationHandler</code> is applicable. </td>
+ </tr>
+ <tr>
+ <td><code>authtype</code> </td>
+ <td>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 <code>AuthenticationInfo</code> object provided by the <code>extractCredentials</code> method. If this property is set, the <code>requestCredentials</code> method of the authentication handler is only called if the <code>sling:authRequestLogin</code> request parameter is either not set or is set to the same value as the <code>authtype</code> of the handler. This property is optional. If not set, the <code>requestCredentials</code> method is always called regardless of the value of the <code>sling:authRequestLogin</code> request parameter. </td>
+ </tr>
+ </tbody>
+</table>
+<p>Each path may be an absolute URL, an URL with just the host/port and path or just a plain absolute path:</p>
+<table>
+ <thead>
+ <tr>
+ <th>URL part </th>
+ <th>Scheme </th>
+ <th>Host/Port </th>
+ <th>Path </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Absolute URL </td>
+ <td>must match </td>
+ <td>must match </td>
+ <td>request URL path is prefixed with the path </td>
+ </tr>
+ <tr>
+ <td>Host/Port with Path </td>
+ <td>ignored </td>
+ <td>must match </td>
+ <td>request URL path is prefixed with the path </td>
+ </tr>
+ <tr>
+ <td>Path </td>
+ <td>ignored </td>
+ <td>ignored </td>
+ <td>request URL path is prefixed with the path </td>
+ </tr>
+ </tbody>
+</table>
+<p>When looking for an <code>AuthenticationHandler</code> the authentication handler is selected whose path is the longest match on the request URL. If the service is registered with Scheme and Host/Port, these must exactly match for the service to be eligible. If multiple <code>AuthenticationHandler</code> services are registered with the same length matching path, the handler with the higher service ranking is selected[^ranking].</p>
+<p>[^ranking]: Service ranking is defined by the OSGi Core Specification as follows: <em>If multiple qualifying service interfaces exist, a service with the highest <code>service.ranking</code> number, or when equal to the lowest <code>service.id</code>, determines which service object is returned by the Framework</em>.</p>
+<p>The value of <code>path</code> service registration property value triggering the call to any of the <code>AuthenticationHandler</code> methods is available as the <code>path</code> request attribute (for the time of the method call only). If the service is registered with multiple path values, the value of the <code>path</code> request attribute may be used to implement specific handling.</p>
+<h3>Implementations provided by Sling</h3>
+<ul>
+ <li><a href="/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.html">Form Based AuthenticationHandler</a></li>
+ <li><a href="/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.html">OpenID AuthenticationHandler</a></li>
+</ul>
+<h3>Sample implementations</h3>
+<h4>HTTP Basic Authentication Handler</h4>
+<ul>
+ <li><code>extractCredentials</code> -- Get user name and password from the <code>Authorization</code> HTTP header</li>
+ <li><code>requestCredentials</code> -- Send a 401/UNAUTHORIZED status with <code>WWW-Authenticate</code> response header setting the Realm</li>
+ <li><code>dropCredentials</code> -- Send a 401/UNAUTHORIZED status with <code>WWW-Authenticate</code> response header setting the Realm</li>
+</ul>
+<p>Interestingly the <code>dropCredentials</code> method is implemented in the same way as the <code>requestCredentials</code> method. The reason for this is, that HTTP Basic authentication does not have a notion of login and logout. Rather the request is accompanied with an <code>Authorization</code> header or not. The contents of this header is usually cached by the client browser. So logout is actually simulated by sending a 401/UNAUTHORIZED status thus causing the client browser to clear the cache and ask for user name and password.</p>
+<h4>Form Based Authentication Handler</h4>
+<ul>
+ <li><code>extractCredentials</code> -- Get user name and password with the help of a special cookie (note, that of course the cookie should not contain this data, but refer to it in an internal store of the authentication handler). If the cookie is not set, check for specific login parameters to setup the cookie.</li>
+ <li><code>requestCredentials</code> -- Send the login form for the user to provide the login parameters.</li>
+ <li><code>dropCredentials</code> -- Clear the authentication cookie and internal store.</li>
+</ul>
+<p>///Footnotes Go Here///</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.html b/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.html
new file mode 100644
index 0000000..64092aa
--- /dev/null
+++ b/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.html
@@ -0,0 +1,180 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Form Based AuthenticationHandler</h1></header><p>[TOC]</p>
+<p>The Form Based AuthenticationHandler has two authentication phases: The first phase is presenting a login form to the user and passing the entered user name and password to the server. The second phase is storing successful authentication in a Cookie or an HTTP Session.</p>
+<p>The implementation of the Form Based Authentication Handler follows the guidelines of the Servlet API 2.4 specification for <em>Form Based Authentication</em> in section SRV.12.5.3. Specifically the following requirements are implemented:</p>
+<ul>
+ <li>For the initial form submission, the request URL must end with <code>/j_security_check</code> and the user name and password names must be <code>j_username</code> and <code>j_password</code>, resp.</li>
+ <li>The authentication type as returned by <code>HttpServletRequest.getAuthType()</code> is set to <code>HttpServletRequest.FORM_AUTH</code>.</li>
+</ul>
+<p>The Form Based Authentication Handler is maintained in the <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/form">Sling SVN</a></p>
+<h3>AuthenticationHandler implementation</h3>
+<ul>
+ <li><code>extractCredentials</code> -- Prepares credentials for the form entered data or from the Cookie or HTTP Session attribute. Returns <code>null</code> if neither data is provided in the request</li>
+ <li><code>requestCredentials</code> -- Redirects the client (browser) to the login form</li>
+ <li><code>dropCredentials</code> -- Remove the Cookie or remove the HTTP Session attribute</li>
+</ul>
+<h3>AuthenticationFeedbackHandler implementation</h3>
+<ul>
+ <li><code>authenticationFailed</code> -- Remove the Cookie or remove the HTTP Session attribute</li>
+ <li><code>authenticationSucceeded</code> -- Set (or update) the Cookie or HTTP Session attribute</li>
+</ul>
+<h3>Phase 1: Form Submission</h3>
+<p>The login form submitted in phase 1 to validate the user name and password must be provided in an HTTP <code>POST</code> request to an URL whose last segment is <code>j_security_check</code>. The request is ignored as a form submission if either the method is not <code>POST</code> or the last segment is no <code>j_security_check</code>.</p>
+<p>The form is rendered by redirecting the client to the URL indicated by the <code>form.login.form</code> configuration parameter. This redirection request may accompanyied by the following parameters:</p>
+<ul>
+ <li><code>resource</code> -- The resource to which the user should be redirected after successful login. This request parameter should be submitted back to the server as the <code>resource</code> parameter.</li>
+ <li><code>j_reason</code> -- This parameter indicates the reason for rendering the login form. If this parameter is set, it is set to <code>INVALID_CREDENTIALS</code> indicating a previous form submission presented invalid username and password or <code>TIMEOUT</code> indicating a login session has timed out. The login form servlet/script can present the user with an appropriate message.</li>
+</ul>
+<p>The Form Based Authentication Handlers supports the following request parameters submitted by the HTML form:</p>
+<ul>
+ <li><code>j_username</code> -- Name of the user to authenticate</li>
+ <li><code>j_password</code> -- Password to authenticate the user</li>
+ <li><code>j_validate</code> -- Flag indicating whether to just validate the credentials</li>
+ <li><code>resource</code> -- The location to go to on successful login</li>
+ <li><code>sling.auth.redirect</code> -- The location to redirect to on successful login</li>
+</ul>
+<p>The <code>j_username</code> and <code>j_password</code> parameters are used to create a JCR <code>SimpleCredentials</code> object to log into the JCR Repository.</p>
+<p>The <code>j_validate</code> parameter may be used to implement login form submission using AJAX. If this parameter is set to <code>true</code> (case-insensitive) the credentials are used to login and after success or failure to return a status code:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Status </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>200 OK</code> </td>
+ <td>Authentication succeeded; credentials are valid for login; the Cookie or HTTP Session attribute is now set </td>
+ </tr>
+ <tr>
+ <td><code>403 FORBIDDEN</code> </td>
+ <td>Authentication failed; credentials are invalid for login; the Cookie or HTTP Session attribute is not set (if it was set, it is now cleared) </td>
+ </tr>
+ </tbody>
+</table>
+<p>If the <code>j_validate</code> parameter is not set or is set to any value other than <code>true</code>, the request processing depends on authentication success or failure:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Authentication </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Success </td>
+ <td>Client is redirected to the authenticated resource; the Cookie or HTTP Session attribute is now set. </td>
+ </tr>
+ <tr>
+ <td>Failure </td>
+ <td>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) </td>
+ </tr>
+ </tbody>
+</table>
+<p>The <code>resource</code> and <code>sling.auth.redirect</code> parameters provide similar functionality but with differing historical backgrounds. The <code>resource</code> parameter is based on the <code>resource</code> request attribute which is set by the login servlet to indicate the original target resource the client desired when it was forced to authenticate. The <code>sling.auth.redirect</code> parameter can be used by clients (applications like cURL or plain HTML forms) to request being redirected after successful login. If both parameters are set, the <code>sling.auth.redirect</code> parameter takes precedence.</p>
+<p>The Form Based Authentication Handler contains a <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/AuthenticationFormServlet.java">default form servlet</a> and <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/form/src/main/resources/org/apache/sling/auth/form/impl/login.html">HTML form template</a>.</p>
+<h3>Phase 2: Authenticated Requests</h3>
+<p>After the successful authentication of the user in phase 1, the authentication state is stored in a Cookie or an HTTP Session. The stored value is a security token with the following contents:</p>
+<p>HmacSHA1(securetoken, <securetokennumber><expirytime>@<userID>)@<securetokennumber><expirytime>@<userID></p>
+<p>The <code>securetoken</code> and <code>securetokennumber</code> are related in that an table of secure tokens is maintained where the <code>securetoken</code> is an entry in the table and the <code>securetokennumber</code> is the index in of the token in the table.</p>
+<p>The secure tokens are refreshed periodically causing the authentication state stored in the Cookie or the HTTP Session to be updated peridocally. This periodic update has two advantages:</p>
+<ul>
+ <li>Login sessions time out after some period of inactivity: If a request is handled for an authentication state whose expiry time has passed, the request is considered unauthenticated.</li>
+ <li>If a Cookie would be stolen or an HTTP Session be hijacked, the authentication state expires within a reasonable amount of time to try to prevent stealing the authentication.</li>
+</ul>
+<p>The authentication state may be transmitted with a Cookie which is configured as follows:</p>
+<ul>
+ <li><em>Cookie Path</em> -- Set to the servlet context path</li>
+ <li><em>Domain</em> -- See below</li>
+ <li><em>Age</em> -- Set to -1 to indicate a session Cookie</li>
+ <li><em>Secure</em> -- Set to the value returned by the <code>ServletRequest.isSecure()</code> method</li>
+</ul>
+<p>If the authentication state is kept in an HTTP Session the setup of the session ID cookie is maintained by the servlet container and is outside of the control of the Form Based AuthenticationHandler.</p>
+<h3>Configuration</h3>
+<p>The Form Based Authentication Handler is configured with configuration provided by the OSGi Configuration Admin Service using the <code>org.apache.sling.formauth.FormAuthenticationHandler</code> service PID.</p>
+<table>
+ <thead>
+ <tr>
+ <th>Parameter </th>
+ <th>Default </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>form.login.form</code> </td>
+ <td><code>/system/sling/form/login</code> </td>
+ <td>The URL (without any context path prefix) to redirect the client to to present the login form. </td>
+ </tr>
+ <tr>
+ <td><code>form.auth.storage</code> </td>
+ <td><code>cookie</code> </td>
+ <td>The type of storage used to provide the authentication state. Valid values are <code>cookie</code> and <code>session</code>. The default value also applies if any setting other than the supported values is configured. </td>
+ </tr>
+ <tr>
+ <td><code>form.auth.name</code> </td>
+ <td><code>sling.formauth</code> </td>
+ <td>The name of the Cookie or HTTP Session attribute providing the authentication state. </td>
+ </tr>
+ <tr>
+ <td><code>form.auth.timeout</code> </td>
+ <td><code>30</code> </td>
+ <td>The number of minutes after which a login session times out. This value is used as the expiry time set in the authentication data. </td>
+ </tr>
+ <tr>
+ <td><code>form.credentials.name</code> </td>
+ <td><code>sling.formauth</code> </td>
+ <td>The name of the <code>SimpleCredentials</code> attribute used to provide the authentication data to the <code>LoginModulePlugin</code>. </td>
+ </tr>
+ <tr>
+ <td><code>form.token.file</code> </td>
+ <td><code>cookie-tokens.bin</code> </td>
+ <td>The name of the file used to persist the security tokens. </td>
+ </tr>
+ <tr>
+ <td><code>form.default.cookie.domain</code> </td>
+ <td> </td>
+ <td>The domain on which cookies will be set, unless overridden in the <code>AuthenticationInfo</code> object. </td>
+ </tr>
+ </tbody>
+</table>
+<p><em>Note:</em> The <code>form.token.file</code> parameter currently refers to a file stored in the file system. If the path is a relative path, the file is either stored in the Authentication Handler bundle private data area or -- if not possible -- below the location indicated by the <code>sling.home</code> framework property or -- if <code>sling.home</code> is not set -- the current working directory. In the future this file may be store in the JCR Repository to support clustering scenarios.</p>
+<h3>Security Considerations</h3>
+<p>Form Based Authentication has some limitations in terms of security:</p>
+<ol>
+ <li>User name and password are transmitted in plain text in the initial form submission.</li>
+ <li>The Cookie used to provide the authentication state or the HTTP Session ID may be stolen.</li>
+</ol>
+<p>To prevent eavesdroppers from sniffing the credentials or stealing the Cookie a secure transport layer should be used such as TLS/SSL, VPN or IPSec.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.html b/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.html
new file mode 100644
index 0000000..936b49d
--- /dev/null
+++ b/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.html
@@ -0,0 +1,141 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>OpenID AuthenticationHandler</h1></header><p>[TOC]</p>
+<p>The OpenID Authentication Handler supports authentication of request users using the <a href="http://www.openid.net">OpenID</a> authentication protocol. If the user has successfully authenticated with his OpenID provider a signed OpenID identity is further used to identify the user.</p>
+<p>Since generally an OpenID identity is an URL and URLs may not be used as JCR user names, an association mechanism is used by the OpenID authentication handler to associate an OpenID identity with an existing JCR user: The OpenID identity URL is set as the value of a JCR user property. When a user authenticates with his OpenID identity the matching user searched for by looking for a match in this property.</p>
+<p><em>NOTE:</em> This association currently only works with Jackrabbit (or Jackrabbit based repositories) because user management is not part of the JCR 2 specification and the OpenID authentication handler uses the Jackrabbit <code>UserManager</code> to find users by a user property value.</p>
+<p>The OpenID Authentication Handler is maintained in the <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/openid/">Sling SVN</a></p>
+<h3>Credentials Extraction</h3>
+<p>Theoretically each request with the <code>openid_identifier</code> request parameter set may initiate an OpenID authentication process which involves resolving the OpenID provider for the identifier and subsequently authentication with the provider authorizing the Sling instance to use the OpenID identity.</p>
+<p>This initiation, though, is not possible if the request already contains a valid and validated OpenID identifier either set as a request attribute or set in the HTTP Session or the OpenID cookie. In these situations, the current association of a client with an OpenID identity must first be removed by logging out, e.g. by requesting <code>/system/sling/logout.html</code> which causes the current OpenID user data to be removed by either removing it from the HTTP Session or by clearing the OpenID cookie.</p>
+<h3>Phase 1: Form Submission</h3>
+<p>Requesting an OpenID identifier is initiated by the Sling Authenticator deciding, that authentication is actually required to process a request and the OpenID Authentication Handler being selected to request credentials with.</p>
+<p>In this case the OpenID authenticator causes a form to be rendered by redirecting the client to the URL indicated by the <code>form.login.form</code> configuration parameter. This redirection request may accompanied by the following parameters:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Request Parameter </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>resource</code> </td>
+ <td>The location to which the user initially requested access and that caused the <code>requestCredentials</code> method to be called. This may not be set (or be set to an empty string). </td>
+ </tr>
+ <tr>
+ <td><code>j_reason</code> </td>
+ <td>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 <code>extractCredentials</code> or the <code>authenticationFailed</code> method. The value of the parameter is the name of one of the <code>OpenIDFailure</code> constants. </td>
+ </tr>
+ <tr>
+ <td><code>j_openid_identity</code> </td>
+ <td>The OpenID identity which could not successfully be associated with an existing JCR user. This request parameter is only set if the <code>authenticationFailed</code> method has been called due to inability to associate an existing and validated OpenID identity with an existing JCR user. </td>
+ </tr>
+ </tbody>
+</table>
+<p>The OpenID Authentication handlers supports the following request parameters submitted by the HTML form:</p>
+<ul>
+ <li><code>openid_identifier</code> -- OpenID Claimed Identifier. This may be any actual OpenID identity URL or the URL of OpenID Provider such as https://www.google.com/accounts/o8/id, https://me.yahoo.com, or https://www.myopenid.com.</li>
+ <li><code>sling:authRequestLogin</code> -- This request parameter is recommended to be set with a hidden field to the value <em>OpenID</em> to ensure the request is handled by the OpenID Authentication Handler.</li>
+ <li><code>resource</code> -- The <code>resource</code> request parameter should be sent back to ensure the user is finally redirected to requested target resource after successful authentication. If this request parameter is not set, or is set to an empty string, it is assumed to be the request context root path.</li>
+</ul>
+<p>The OpenID Authentication Handler provides a default login form registered at <code>/system/sling/openid/login</code>.</p>
+<h3>Configuration</h3>
+<p>The OpenID AuthenticationHandler is configured with configuration provided by the OSGi Configuration Admin Service using the <code>org.apache.sling.openidauth.OpenIdAuthenticationHandler</code> service PID.</p>
+<table>
+ <thead>
+ <tr>
+ <th>Parameter </th>
+ <th>Default </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+</table>
+<p>| <code>path</code> | -- | Repository path for which this authentication handler should be used by Sling. If this is empty, the authentication handler will be disabled. | | <code>openid.login.form</code> | <code>/system/sling/openid/login</code> | 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. | | <code>openid.login.identifier</code> | <code>openid_identifier</code> | The name of the form parameter that provides the user's OpenID identifier. By convention this is <code>openid_identifier</code>. Only change this if you have a very good reason to do so. | | <code>openid.extern
al.url.prefix</code> | -- | The prefix of URLs generated for the <code>ReturnTo</code> and <code>TrustRoot</code> 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.| | <code>openid.use.cookie</code> | <code>true</code> | 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. | | <code>openid.cookie.domain</code> | -- | 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 sh
are the cookie amongst a server farm or if the server is running behind a proxy. Only used if 'Use Cookie' is checked. | | <code>openid.cookie.name</code> | <code>sling.openid</code> | Name of cookie used to persist authentication. Only used if 'Use Cookie' is checked. | | <code>openid.cookie.secret.key</code> | <code>secret</code> | Secret key used to create a signature of the cookie value to prevent tampering. Only used if 'Use Cookie' is true. | | <code>openid.user.attr</code> | <code>openid.user</code> | 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. | | <code>openid.property.identity</code> | <code>openid.identity</code> | 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 l
ists the identity in this property. |</p>
+<h3>AuthenticationHandler implementation</h3>
+<h4>extractCredentials</h4>
+<p>To extract authentication information from the request, the Sling OpenID Authentication handler considers the following information in order:</p>
+<ol>
+ <li>The OpenID credentials cookie or OpenID User data in the HTTP Session (depending on the <code>openid.use.cookie</code> configuration)</li>
+ <li>Otherwise the <code>openid_identifier</code> request parameter (or a different request parameter depending on the <code>openid.login.identifier</code> configuration)</li>
+</ol>
+<p>If the OpenID credentials already exist in the request, they are validated and returned if valid</p>
+<p>If the existing credentials fail to validate, authentication failure is assumed and the credentials are removed from the request, either by clearing the OpenID cookie or by removing the OpenID User data from the HTTP Session.</p>
+<p>If no OpenID credentials are found in the request, the request parameter is considered and if set is used to resolve the actual OpenID identity of the user. This involves redirecting the client to the OpenID provider resolved from the OpenID identifier supplied.</p>
+<p>If the supplied OpenID identifier fails to resolve to an OpenID provider or if the identifier fails to be resolved to a validated OpenID identity, authentication fails.</p>
+<h4>requestCredentials</h4>
+<p>If the <code>sling:authRequestLogin</code> parameter is set to a value other than <code>OpenID</code> this method immediately returns <code>false</code>.</p>
+<p>If the parameter is not set or is set to <code>OpenID</code> this method continues with first invalidating any cached OpenID credentials (same as <code>dropCredentials</code> does) and then redirecting the client to the login form configured with the <code>openid.login.form</code> configuration property. The redirect is provided with up to three request parameters:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Request Parameter </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>resource</code> </td>
+ <td>The location to which the user initially requested access and that caused the <code>requestCredentials</code> method to be called. </td>
+ </tr>
+ <tr>
+ <td><code>j_reason</code> </td>
+ <td>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 <code>extractCredentials</code> or the <code>authenticationFailed</code> method. The value of the parameter is the name of one of the <code>OpenIDFailure</code> constants. </td>
+ </tr>
+ <tr>
+ <td><code>j_openid_identity</code> </td>
+ <td>The OpenID identity which could not successfully be associated with an existing JCR user. This request parameter is only set if the <code>authenticationFailed</code> method has been called due to inability to associate an existing and validated OpenID identity with an existing JCR user. </td>
+ </tr>
+ </tbody>
+</table>
+<h4>dropCredentials</h4>
+<p>Invalidates the OpenID identity currently stored with the request. This means to either remove the OpenID cookie or to remove the OpenID information from the HTTP Session. This method does not write to the response (except setting the <code>Set-Cookie</code> header to remove the OpenID cookie if required) and does not commit the response.</p>
+<h3>AuthenticationFeedbackHandler implementation</h3>
+<h4>authenticationFailed</h4>
+<p>This method is called, if the Credentials provided by the Authentication Handler could not be validated by the Jackrabbit authentication infrastructure. One cause may be that the integration with Jackrabbit has not been completed (see <em>Integration with Jackrabbit</em> below). Another, more probably cause, is that the validated OpenID identifier cannot be associated with an existing JCR user.</p>
+<p>The OpenID Authentication Handler implementation of the <code>authenticationFailed</code> method sets the <code>j_reason</code> request attribute to <code>OpenIDFailure.REPOSITORY</code> and sets the <code>j_openid_identity</code> request attribute to the OpenID identity of the authenticated user.</p>
+<p>A login form provider may wish to act upon this situation and provide a login form to the user to allow to his OpenID identity with an existing JCR user.</p>
+<p>In addition, the current OpenID identity is invalidated thus the cached OpenID information is removed from the HTTP Session or the OpenID cookie is cleaned. This will allow the user to present a different OpenID identifier to retry or it will require the OpenID identity to be revalidated with the OpenID provider if the identity is associated with a JCR user.</p>
+<h4>authenticationSucceeded</h4>
+<p>The OpenID Authentication Handler implementation of the <code>authenticationSucceeded</code> method just calls the <code>DefaultAuthenticationFeedbackHandler.handleRedirect</code> method to redirect the user to the initially requested location.</p>
+<h3>Integration with Jackrabbit</h3>
+<p>The OpenID authentication handler can be integrated in two ways into the Jackrabbit authentication mechanism which is based on JAAS <code>LoginModule</code>. One integration is by means of a <code>LoginModulePlugin</code> which plugs into the extensible <code>LoginModule</code> architecture supported by the Sling Jackrabbit Embedded Repository bundle.</p>
+<p>The other integration option is the <code>trusted_credentials_attribute</code> mechanism supported by the Jackrabbit <code>DefaultLoginModule</code>. By setting the <code>trusted_credentials_attribute</code> parameter of the Jackrabbit <code>DefaultLoginModule</code> and the <code>openid.user.attr</code> configuration property of the OpenID Authentication Handler to the same value, the existence of an attribute of that name in the <code>SimpleCredentials</code> instance provided to the <code>Repository.login</code> method signals pre-authenticated credentials, which need not be further checked by the <code>DefaultLoginModule</code>.</p>
+<h3>Security Considerations</h3>
+<p>OpenIDAuthentication has some limitations in terms of security:</p>
+<ol>
+ <li>User name and password are transmitted in plain text in the initial form submission.</li>
+ <li>The Cookie used to provide the authentication state or the HTTP Session ID may be stolen.</li>
+ <li>When using the <code>trusted_credentials_attribute</code> mechanism, any intruder knowing the attribute name may log into the repository as any existing JCR user. The better option is to be based on the <code>LoginModulePlugin</code> mechanism.</li>
+</ol>
+<p>To prevent eavesdroppers from sniffing the credentials or stealing the Cookie a secure transport layer should be used such as TLS/SSL, VPN or IPSec.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/authentication/authentication-framework.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/authentication/authentication-framework.html b/documentation/the-sling-engine/authentication/authentication-framework.html
new file mode 100644
index 0000000..e5d3ea1
--- /dev/null
+++ b/documentation/the-sling-engine/authentication/authentication-framework.html
@@ -0,0 +1,184 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Authentication - Framework</h1></header><p>Excerpt: The core piece of functionality with respect to authentication in Sling is contained in the Sling Auth Core bundle. This bundle provides the API for Sling and Sling applications to make use of authentication.</p>
+<p>The core piece of functionality with respect to authentication in Sling is contained in the Sling Auth Core bundle. This bundle provides the API for Sling and Sling applications to make use of authentication.</p>
+<p>This support encompasses three parts:</p>
+<ul>
+ <li>The <code>AuthenticationSupport</code> service provided by the <code>SlingAuthenticator</code> class. This service can be used by implementations of the OSGi <code>HttpContext</code> interface to delegate authentication.</li>
+ <li>The <code>Authenticator</code> service also provided by the <code>SlingAuthenticator</code> class. This service may be used by Sling applications to help clients login and logout.</li>
+ <li>The <code>AuthenticationHandler</code> service interface. These services may be implemented by extensions to support various ways for transporting credentials from clients to the Sling server.</li>
+</ul>
+<p>This page describes how the <code>SlingAuthenticator</code> class provides the <code>AuthenticationSupport</code> and <code>Authenticator</code> services. For a description of the <code>AuthenticationHandler</code> service interface and the interaction between the <code>SlingAuthenticator</code> and the <code>AuthenticationHandler</code> services refer to the <a href="/documentation/the-sling-engine/authentication/authentication-authenticationhandler.html">AuthenticationHandler</a> page.</p>
+<p>The <code>SlingAuthenticator</code> class is an internal class of the <code>org.apache.sling.auth.core</code> bundle and implements the <code>Authenticator</code> and <code>AuthenticationSupport</code> services.</p>
+<h2>AuthenticationSupport</h2>
+<p>The <code>AuthenticationSupport</code> service interface defines a single method: <code>handleSecurity</code>. This method is intended to be called by the <code>handleSecurity</code> method of any <code>HttpContext</code> implementation wishing to make use of the Sling Authentication Framework.</p>
+<p>The Sling Authenticator implementation selects an <code>AuthenticationHandler</code> service appropriate for the request and calls the <code>AuthenticationHandler.extractCredentials</code> method to extract the credentials from the request. If no credentials could be extracted, the Sling Authenticator either admits the request as an anonymous request or requests authentication from the client by calling its own <code>login</code> method.</p>
+<p>The implementation follows this algorithm:</p>
+<ol>
+ <li>Select one or more <code>AuthenticationHandler</code> for the request according to the request URL's scheme and authorization part.</li>
+ <li>Call the <code>extractCredentials</code> method of each authentication handler, where the order of handler call is defined by the length of the registered path: handlers registered with longer paths are called before handlers with shorter paths. The goal is to call the handlers in order from longest request path match to shortest match. Handlers not matching the request path at all are not called.</li>
+ <li>The first handler returning a non-<code>null</code> <code>AuthenticationInfo</code> result "wins" and the result is used for authentication.</li>
+ <li>If any <code>AuthenticationInfoPostProcessor</code> services are registered, the <code>AuthenticationInfo</code> object is passed to their <code>postProcess()</code> method.</li>
+ <li>If no handler returns a non-<code>null</code> result, the request may be handled anonymously. In these cases, an empty <code>AuthenticationInfo</code> object is passed to any <code>AuthenticationInfoPostProcessor</code> services.</li>
+ <li>(Try to) log into the repository either with the provided credentials or anonymously.</li>
+ <li>If there were credentials provided and the login was successful, a login event is posted <em>if</em> the <code>AuthenticationInfo</code> object contains a non-null object with the key <code>$$auth.info.login$$</code> (<code>AuthConstants.AUTH_INFO_LOGIN</code>). This event is posted with the topic <code>org/apache/sling/auth/core/Authenticator/LOGIN</code>. (added in Sling Auth Core 1.1.0)</li>
+ <li>Set request attributes listed below.</li>
+</ol>
+<p>Extracting the credentials and trying to login to the repository may yield the following results:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Credentials </th>
+ <th>Login </th>
+ <th>Consequence </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>present </td>
+ <td>successful </td>
+ <td>Continue with an authenticated request </td>
+ </tr>
+ <tr>
+ <td>present </td>
+ <td>failed </td>
+ <td>Select <code>AuthenticationHandler</code> and call <code>requestCredentials</code> method </td>
+ </tr>
+ <tr>
+ <td>missing </td>
+ <td>anonymous allowed </td>
+ <td>Continue with a non authenticated request using anonymous access to the repository </td>
+ </tr>
+ <tr>
+ <td>missing </td>
+ <td>anonymous forbidden </td>
+ <td>Select <code>AuthenticationHandler</code> and call <code>requestCredentials</code> method </td>
+ </tr>
+ </tbody>
+</table>
+<div class="note">
+Only one <code>AuthenticationHandler</code> 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 <code>AuthenticationHandler</code> is consulted.
+</div>
+<h4>Request Attributes on Successful Login</h4>
+<p>The <code>handleSecurity</code> method gets credentials from the <code>AuthenticationHandler</code> and logs into the JCR repository using those credentials. If the login is successful, the <code>SlingAuthenticator</code> sets the following request attributes:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Attribute </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>org.osgi.service.http.authentication.remote.user</code> </td>
+ <td>The user ID of the JCR Session. This attribute is used by the HTTP Service implementation to implement the <code>HttpServletRequest.getRemoteUser</code> method. </td>
+ </tr>
+ <tr>
+ <td><code>org.osgi.service.http.authentication.type</code> </td>
+ <td>The authentication type defined by the <code>AuthenticationHandler</code>. This attribute is used by the HTTP Service implementation to implement the <code>HttpServletRequest.getAuthType</code> method. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.auth.core.ResourceResolver</code> </td>
+ <td>The <code>ResourceResolver</code> created from the credentials and the logged in JCR Session. This attribute may be used by servlets to access the repository. Namely the <code>SlingMainServlet</code> uses this request attribute to provide the <code>ResourceResolver</code> to handle the request. </td>
+ </tr>
+ <tr>
+ <td><code>javax.jcr.Session</code> </td>
+ <td>The JCR Session. This attribute is for backwards compatibility only. <em>Its use is deprecated and the attribute will be removed in future versions</em>. </td>
+ </tr>
+ <tr>
+ <td><code>org.apache.sling.auth.core.spi.AuthenticationInfo</code> </td>
+ <td>The <code>AuthenticationInfo</code> object produced from the <code>AuthenticationHandler</code>. </td>
+ </tr>
+ </tbody>
+</table>
+<p><strong>NOTE</strong>: Do <em>NOT</em> use the <code>javax.jcr.Session</code> request attribute in your Sling applications. This attribute must be considered implementation specific to convey the JCR Session to the <code>SlingMainServlet</code>. In future versions of the Sling Auth Core bundle, this request attribute will not be present anymore. To get the JCR Session for the current request adapt the request's resource resolver to a JCR Session:</p>
+<p>Session session = request.getResourceResolver().adaptTo(Session.class);</p>
+<h4>Anonymous Login</h4>
+<p>The <code>SlingAuthenticator</code> provides high level of control with respect to allowing anonymous requests or requiring authentication up front:</p>
+<ul>
+ <li>Global setting of whether anonymous requests are allowed or not. This is the boolean value of the <em>Allow Anonymous Access</em> (<code>auth.annonymous</code>) property of the <code>SlingAuthenticator</code> configuration. This property is supported for backwards compatibility and defaults to <code>true</code> (allowing anonymous access). Setting it to <code>true</code> is a shortcut for setting <code>sling.auth.requirements</code> to <code>-/</code>.</li>
+ <li>Specific configuration per URL. The <em>Authentication Requirements</em> (<code>sling.auth.requirements</code>) property of the <code>SlingAuthenticator</code> configuration may provide a list of URLs for which authentication may be required or not: Any entry prefixed with a dash <code>-</code> defines a request path prefix for which authentication is not required. Any entry not prefixed with a dash or prefixed with a plus <code>+</code> defines a subtree for which authentication is required up front and thus anonymous access is not allowed. This list is empty by default.</li>
+ <li>Any OSGi service may provide a <code>sling.auth.requirements</code> registration property which is used to dynamically extend the authentication requirements from the <em>Authentication Requirements</em> configuration. This may for example be set by <code>AuthenticationHandler</code> implementations providing a login form to ensure access to the login form does not require authentication. The value of this property is a single string, an array of strings or a Collection of strings and is formatted in the same way as the <em>Authentication Requirements</em> configuration property.</li>
+</ul>
+<p>The values set on the <em>Authentication Requirements</em> configuration property or the <code>sling.auth.requirements</code> service registration property can be absolute paths or URLs like the <code>path</code> service registration property of <code>AuthenticationHandler</code> services. This allows the limitation of this setup to certain requests by scheme and/or virtual host address. The requests path (<code>HttpServletRequest.getServletPath()</code> + <code>HttpServletRequest.getPathInfo()</code>) is afterwards matched against the given paths. It matches if it starts with one of the given paths.</p>
+<p><strong>Examples</strong></p>
+<ul>
+ <li>The <code>LoginServlet</code> contained in the Sling Auth Core bundle registers itself with the service registration property <code>sling.auth.requirements = "-/system/sling/login"</code> to ensure the servlet can be accessed without requiring authentication (checks for <code>slash</code> or <code>dot</code> or <code>end of string</code>). The following request urls would work then without authentication:</li>
+ <li>/system/sling/login</li>
+ <li>/system/sling/login.html</li>
+ <li>/system/sling/login/somesuffix</li>
+</ul>
+<p>While the following request will still require authentication</p>
+<ul>
+ <li>
+ <p>/system/sling/login-test</p></li>
+ <li>
+ <p>An authentication handler may register itself with the service registration property <code>sling.auth.requirements = "-/apps/sample/loginform"</code> to ensure the login form can be rendered without requiring authentication.</p></li>
+</ul>
+<h2>Authenticator implementation</h2>
+<p>The implementation of the <code>Authenticator</code> interface is similar for both methods:</p>
+<p><strong><code>login</code></strong></p>
+<ol>
+ <li>Select one or more <code>AuthenticationHandler</code> for the request according to the request URL's scheme and authorization part.</li>
+ <li>Call the <code>requestCredentials</code> method of each authentication handler, where the order of handler call is defined by the length of the registered path: handlers registered with longer paths are called before handlers with shorter paths. The goal is to call the handlers in order from longest request path match to shortest match. Handlers not matching the request path at all are not called.</li>
+ <li>As soon as the first handlers returns <code>true</code>, the process ends and it is assumed credentials have been requested from the client.</li>
+</ol>
+<p>The <code>login</code> method has three possible exit states:</p>
+<table>
+ <thead>
+ <tr>
+ <th>Exit State </th>
+ <th>Description </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Normal </td>
+ <td>An <code>AuthenticationHandler</code> could be selected to which the login request could be forwarded. </td>
+ </tr>
+ <tr>
+ <td><code>NoAuthenticationHandlerException</code> </td>
+ <td>No <code>AuthenticationHandler</code> 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. </td>
+ </tr>
+ <tr>
+ <td><code>IllegalStateException</code> </td>
+ <td>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. </td>
+ </tr>
+ </tbody>
+</table>
+<p><strong><code>logout</code></strong></p>
+<ol>
+ <li>Select one or more <code>AuthenticationHandler</code> for the request according to the request URL's scheme and authorization part.</li>
+ <li>Call the <code>dropCredentials</code> method of each authentication handler, where the order of handler call is defined by the length of the registered path: handlers registered with longer paths are called before handlers with shorter paths. The goal is to call the handlers in order from longest request path match to shortest match. Handlers not matching the request path at all are not called.</li>
+</ol>
+<p>Unlike for the <code>login</code> method in the <code>logout</code> method case all <code>AuthenticationHandler</code> services selected in the first step are called. If none can be selected or none can actually handle the <code>dropCredentials</code> request, the <code>logout</code> silently returns.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/authentication/authentication-tasks.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/authentication/authentication-tasks.html b/documentation/the-sling-engine/authentication/authentication-tasks.html
new file mode 100644
index 0000000..4475315
--- /dev/null
+++ b/documentation/the-sling-engine/authentication/authentication-tasks.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Authentication - Tasks</h1></header><p>Excerpt: Authentication of HTTP Requests is generally a two-step process: First the credentials must be extracted from the request and second the credentials must be validated. In the case of Sling this means acquiring a JCR Session.</p>
+<p>Authentication of HTTP Requests is generally a two-step process: First the credentials must be extracted from the request and second the credentials must be validated. In the case of Sling this means acquiring a JCR Session.</p>
+<h2>Extract Credentials from the Request</h2>
+<ul>
+ <li>Implemented and controlled by the Sling Auth Core bundle</li>
+ <li>Takes <code>HttpServletRequest</code></li>
+ <li>Provides credentials for futher processing (basically JCR <code>Credentials</code> and Workspace name)</li>
+ <li>Extensible with the help of <code>AuthenticationHandler</code> services</li>
+</ul>
+<h2>Login to the JCR Repository</h2>
+<ul>
+ <li>Implemented and controlled by the JCR Repository</li>
+ <li>Takes JCR <code>Credentials</code> and Workspace name</li>
+ <li>Provides a JCR <code>Session</code></li>
+ <li>Implementation dependent process. Jackrabbit provides extensibility based on <code>LoginModules</code>; Sling's Embedded Jackrabbit Repository bundle provides extensibility with <code>LoginModulePlugin</code> services.</li>
+</ul>
+<p>Currently the credentials are always verified by trying to login to the JCR repository. Once an <a href="http://cwiki.apache.org/SLING/add-resourceresolverfactory-service-interface.html">ResourceResolverFactory</a> API has been added, the process of validating the credentials and logging in is actualy replaced by a process of requesting a <code>ResourceResolver</code> from the <code>ResourceResolverFactory</code>. Of course, the JCR Repository will still be the main underlying repository and as such be used to validate the credentials and get a JCR Session.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/default-mapping-and-rendering.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/default-mapping-and-rendering.html b/documentation/the-sling-engine/default-mapping-and-rendering.html
new file mode 100644
index 0000000..529eb13
--- /dev/null
+++ b/documentation/the-sling-engine/default-mapping-and-rendering.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html><html lang="en">
+ <head>
+<meta charset="utf-8"/>
+ <title>Apache Sling on JBake</title>
+ <link rel="stylesheet" href="/res/css/site.css"/>
+ <link rel="stylesheet" href="/res/css/codehilite.css"/>
+ <div class="title">
+ <div class="logo">
+ <a href="http://sling.apache.org">
+ <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+ </a>
+ </div><div class="header">
+ <a href="http://www.apache.org">
+ <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+ </a>
+ </div>
+ </div>
+ </head><body>
+<div class="menu">
+ <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials & How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+ </div> <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Default Mapping and Rendering</h1></header><p>translation_pending: true</p>
+<p>This page contained obsolete content, moved it to http://cwiki.apache.org/confluence/display/SLING/Default+Mapping+and+Rendering+%28OBSOLETE%29 in case it is useful to someone.</p></section></div></div>
+<div class="footer">
+ <div class="timestamp">
+ TODO display revision number here
+ </div><div class="trademarkFooter">
+ Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ </div>
+ </div>
+
+ </div>
+ </body>
+</html>
[08/53] sling-site git commit: asf-site branch created for published
content
Posted by bd...@apache.org.
http://git-wip-us.apache.org/repos/asf/sling-site/blob/7b703652/sling-archives/logo/sling-logo-since-2017-SLING-2696/AI/Sling Logo - All Styles.ai
----------------------------------------------------------------------
diff --git a/sling-archives/logo/sling-logo-since-2017-SLING-2696/AI/Sling Logo - All Styles.ai b/sling-archives/logo/sling-logo-since-2017-SLING-2696/AI/Sling Logo - All Styles.ai
deleted file mode 100644
index 24decac..0000000
--- a/sling-archives/logo/sling-logo-since-2017-SLING-2696/AI/Sling Logo - All Styles.ai
+++ /dev/null
@@ -1,802 +0,0 @@
-%PDF-1.5
%����
-1 0 obj
<</Metadata 2 0 R/OCProperties<</D<</ON[5 0 R]/Order 6 0 R/RBGroups[]>>/OCGs[5 0 R]>>/Pages 3 0 R/Type/Catalog>>
endobj
2 0 obj
<</Length 13145/Subtype/XML/Type/Metadata>>stream
-<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
-<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c137 79.159768, 2016/08/11-13:24:42 ">
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <rdf:Description rdf:about=""
- xmlns:xmp="http://ns.adobe.com/xap/1.0/"
- xmlns:xmpGImg="http://ns.adobe.com/xap/1.0/g/img/"
- xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"
- xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
- xmlns:xmpG="http://ns.adobe.com/xap/1.0/g/"
- xmlns:illustrator="http://ns.adobe.com/illustrator/1.0/"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
- xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
- xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
- xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"
- xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
- <xmp:CreatorTool>Adobe Illustrator CC 2017 (Macintosh)</xmp:CreatorTool>
- <xmp:CreateDate>2017-03-31T15:26:30-06:00</xmp:CreateDate>
- <xmp:ModifyDate>2017-03-31T15:26:30-06:00</xmp:ModifyDate>
- <xmp:MetadataDate>2017-03-31T15:26:30-06:00</xmp:MetadataDate>
- <xmp:Thumbnails>
- <rdf:Alt>
- <rdf:li rdf:parseType="Resource">
- <xmpGImg:width>256</xmpGImg:width>
- <xmpGImg:height>56</xmpGImg:height>
- <xmpGImg:format>JPEG</xmpGImg:format>
- <xmpGImg:image>/9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA
AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK
DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f
Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgAOAEAAwER
AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA
AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB
UtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE
1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZ
qbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYECAMDbQEAAhEDBCESMUEFURNhIgZxgZEy
obHwFMHR4SNCFVJicvEzJDRDghaSUyWiY7LCB3PSNeJEgxdUkwgJChgZJjZFGidkdFU38qOzwygp
0+PzhJSktMTU5PRldYWVpbXF1eX1RlZmdoaWprbG1ub2R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo
+DlJWWl5iZmpucnZ6fkqOkpaanqKmqq6ytrq+v/aAAwDAQACEQMRAD8A9U4q7FXYq7FXYq7FX
Yq7
FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYqwvzx561LSNW0
3y9oOnLqWv6oGkhjlf04Y4krV3O1fst3HT6DkYcIkDKRqIcPU6mUJCEBc5JXeeYfzjsbaS6vdN0O
1tYgDLPNdPHGoJoOTM4A3OTGPCTQMmqWXURFkQA97cfmD85ZBCY9M0NxcLztyty5EiUB5JR/iFCD
UY8GHvkoy6nuh81b9Kfnh/1ZdH/5Hyf814OHD3yZcep/mx+bv0p+eH/Vl0f/AJHyf8148OHvkvHq
f5sfmv8AK/m3z3qWpa7pOoWFjBqeim15xRNIUcXUMkoHMuaH4UFabVORzY4xAMTsbZ6bPOUpRmAD
GuXmzm0a5a0ha6RY7oxqZ0Q8kWQgcgpPUA9Mx3MVcVdirsVdirsVdirF/wAwPO3+FdNtpILRr/U9
RuFtNPsw3APK/wDM3YD8TT5i7Bh4zzoBxdVqPCiKFyJoJG2s/nakRll0bRokVeTl7hwFAFTyPOm2
W8GHvk0+Jqf5sfmoWvmn83Lu1hu7Wx0Ce0uG4QXEV2XjkbkV4o6yFWPJSKDvhOPEDRMvkxjn1BFg
Qr3or9Kfnh/1ZdH/AOR8n/NeR4cPfJnx6n+bH5u/Sn54f9WXR/8AkfJ/zXjw4e+S8ep/mx+bWjeb
vzCfzWPLut2Gn2lxNZPe27wNJIKJKsfxVf545MUODiiTzXFny+JwTAG17M20mTVZLJG1SGKC8qec
cLF02OxDGh3zFc9GYq7FXYq7FXYqwTzP588wJ5rHlTyppcWoarFALq9muZPThijNKDYgk/EO/cbH
tlY8MeHikaDg5tVPxPDxi5czaAv/ADP+b2nQrPqFhoNnCzCNZbi7aJS7dFDPIBU06ZKOPEeRl8mu
WbURFkQHxVv01+dXq
+j+iNF9bjz9P6xJy41pypzrSuDgw98mXianlww+a/8ASn54f9WXR/8AkfJ/
zXg4cPfJPHqf5sfm79Kfnh/1ZdH/AOR8n/NePDh75Lx6n+bH5q3lLzX5113TNQkaysY9R0zUbjTr
iANIIy0Ai3D8mPV37b0GQz44xIrkRbbpM0sgPEKIkR8md5Q5TDfPvkW+1260/WdE1D9F+YdJ5/U7
ll5RusgoUk2O3XsepqDmRhzCIIkLiXD1WmMyJRPDOLBPMnnbXdR8l+bvLHma0jtvMGlQQyPJAaxT
RNNFRx1ofiU+9egpTMnHhiJxlE+kuDm1MpY5wmKnEfpCeWGp30Pm38vbCW1tJbO50pzaXRE31uJ1
sg0wFHWLi/BBup79MrlEcEzvz/S3xmRkxChRj8eSTxfmh+Zs3ly881paaUdG0y5Nvc2wE6zyAOqk
rV3UU9Re/vTLDpsfEIb2Wka3OYHJUeGJ82San50836x5mXy75RjtbWSGyiv769vwzBRMFZI0VK70
cb0+6m9McUIx4p99bORPUZJz4MdDaySh/wAop9VvPMnnS91pohrRurW1vYbdSIR9UjeJHRmJJDj9
XvsdUAIxEeSNAZGeQy+qwD8HpuYbsnYq7FXYq7FXYq7FWNefvJcfmzR4rRbprG9tJ0u7G8QcjHNG
CBUVBp8XY9aHtl2DNwG+YcbVafxY1dEbgsQtPN/nDT9QuvJvnGKGe8utPuZdN1W12WcRQuzeouwB
ojdAtPDeuXnFAjjh38nEjqMkSceTmQaIY1ouq3Vh+XP5dUtLS7tJdXcP9ZExkinF7J6MsPpvGtVU
yV51HTbLpxByT3PL9DjY5mOHFsCOL7bZLf8Ann8ybzW/NFnoMGli18ssHkNws/rSoUZlReLlSx9N
v5e2Uxw4xGJlfqcmWpzGUxDhqHvVJvzP8w6vZ+V7Hy
5a28Ou+Y4ZJ5HuyxggSDkHI47mpjant2qc
Rp4xMjL6YpOsnMQEAOKff0UfKMnmWf8AN67g8zzW7anpmk8LZrNGWKaCSZGMhLGoYFwKU/VucvCM
Xp5EowGZ1BE64ox6PVswXaOxV2KuxV2KuxVgfnPyLr9x5gj82eU9RSw16KAW00EyhoLiINy4saNQ
9B07DpSuZWLNER4Ji4uDqNNMz8TGalXzYH51873nmXyK9rqloLHXNH1q2tdSt0NY+dJQGTdtiUYU
qenXMnDhEJ2DcTFwdRqTkxVIVKMwCy+98w6nZfmT5gSW0sjJZeXpbywu0ExmaKKRWSKariOnqM5P
FQenxZQMYOMbneTlyyyGaWw2hY5/aktt+Z/5h2+kaN5p1W10xvLuqXKWrwWwmW4QMzL6nxs6jeNu
5/jlh0+MkxF8QaBrcwjHJIR4JGvNO7nzX+YGv+ZNZ03yktha2eguIJ5r8OzzzkGqqEqFWqkfjXsK
xixxiDO/V3N5z5ck5Rx0BHv6qn5HTzXflnU9RuWH13UdXu7q9jVeKxzScOSLu1RtX6adq4NYKkAO
QAT2aSYEnmZEl6JmI7BgXnS68xXPnHTNG8v68dJ1A2ktz9Xkt1mt5kL8SWYlviXhsCnyOZWERECZ
CxbgaiUzkEYS4TXdsxjVfJen6Zp2vDzPr7XnmfzDbokt8IG9OOON1KAIg6FoQO2w2Hjj6jtfFhnG
J2A3pyNN2FmzwmQeKUtr5IN/O3kq01vynfXOrSPJ5XtpLSVEtJALj1bf0RIpLHiBSpB3wR18JRkB
/EXax9l9UTCW3oHf5UreUIfKWs+TNW8iaZ5hjm1HU5Xu45Ht5IqKzxtxVXI5kenuA1fbY5mHMTIZ
K2DrM3YuXBhljn1PNd520fzDp3m+xv8Ay1HqEU8OmLaXuqaZbx33rSRkIIpYHkRUoqg
1Y+FB8Ncs
wziYESrnyOzrNTinHIDDi+mrAu/gyD8m5dMgXWtMMV7H5iiuFudck1BUWWSScEq44M4ApvSvf3yr
Vgmjtw9Kb+zzEcUd+O97ekZhuxdirsVdirsVdirsVYd+Yt5qynRdP0jVm0fUr+8KW8/oieOQpGx9
OSp+FTWv2W3HbMjABuSLADh6uUvSIy4SSxx/KMum6wfMnnrzAdQ1J7eay05beDhHCkiMjsFQb0WV
uw698q1XaWLDED6QT77bNH2TmzzMieKQHuq2ITan5Q0/yx5c0C51t2fQNQGoCeOzl4yr6rSGIVbZ
qydT92CHamOcpSj/ABCnYY/ZPVHHCPp9MrZF5P8AMnka48x+Zjb66v1jzdx+rQTQSQ+i0aSLxZ2P
Ak+rtuK02y/xDOMaH0tWXsTPglOUh9aH81+StV0TSfKNrpH1q61XRHmSbVtMhWaaGKUl1H1VpFLB
y1KluI3qd6ZkYswkZE1R6H9bo8+mlCMBGyY3uP1I78r7mO385X8evJqR83apbiYXWoQxwK9rGQOK
RRu/p7r06fD26ZHUi4DhrgHcz0RrIePi8SQ69z1vMB2zsVdirsVdirsVeca5L5v1XzzqOm+WfMn6
NlsbWH6zY3FqskQEgLLLG59SrfHvVR9IzLhwRgDKN267IckspjCdUOVMZ17yX5e0ry/e6Pfa87eY
by+h1LUdTe3d1Mq8mC8E7cZWb7W5PboMXJ21ix5eE9BVe9zMPs7my4vTuZSu9uizVvPXkW481ajq
8uqyxtf6NLorw/VJD6bu4b1iQxqv+SPvw49bAxAH863aT9l9UZme28OHmjtF0ry35v8AIVh5N0bX
45bvRZ47ieVoHRnUPI3wxuVJH7ynIEj7xmX4xEzkraTqNT2Rkx4o45bUUD5m07zXZ+etbvPK8eqW
NnqSw859Mt4
r2G5kKn1JGdpY1hZWY06t1O1ctxygYASo137Otz48kcsjDiAPcLv7dmb/AJPT6B/h
M2GkQ3Fu2nXElvqEV4FE31oUMhbiSvegp4UzG1Qlx2ermaAw8Oo3sd772c5jOcxfzP8Al3o/mLVY
NVubq9tL22hNvHLZT+geBYsQSFJ6t45fjzmAoVTi5tJHJISJII7ltn+XWkwxLBc3t7qVutaR30iT
MATWgm4LMBU9A9MxdTix5jc4RvvcvSTyaf6Jyrz3/Ql95+S/ki6nMzJdRt2CXMlB8uRY+2Qhp4x5
O3j27qAK9P8ApQjdM/KryPp1ylzDYNLPGBxe4mlm3BJrxdivfwpmTHIQKDhZtdlyfUVXzD+Xmka5
NC8t3e2MUKBFtbCYW8Joa8mRV3boK+AyePOY9Afe6vPphkNky+BRnlbyX5d8r28sOj23pNcMGuZ3
ZpJZGFac3Yk7V6dMjkzSnzZYNPDEKiE8ytvdirsVdirsVdirsVYx568ueX9Zt7RtXvZrI2UjzWkl
tMIJS/DcISCSeI6LluLKYXXVoz6eOSrvbuSnT/K/lGCFlfzHc3dsGHq29/dwXAVmXlT96jPGWVa/
CQSMr1AhmFThE/BnpYzwG4TmPis1j8tPy0ubopczG1nRgphW9ZCGccgOLsxBYCoGY0NLCPIO7x9u
aiIqwfgFGL8vvynsBFcSSrOY2ADy3zvu7iIEgSAUVz9GZUJGPJx83aWbJzI+QTnzD5d8p6xYhDqZ
0u0s5GWc6dcRWq8224zMo7b0U+JycMxib5+91WfCMvMke4rfKPlDyLoGoSy6VKlxq84aOS4muBcX
JCEh13O1GQ8qDtv0w5M8pijyYYdJDGbHPvZflLkuxV2KuxV2KuxVh+t/lhomra5ca219qNlfXSJH
MbK59BSsahVGy17eOZENRKMeGhTiZNHGcjK5
AnuKJh/LzRfREN9PdamiqFU3cimWgFBWaNI5m22+
JzmFn0+LLLilCPF3jZ2Gk1GXAKhOVedH9CUy/kn5HlnMxW8Vj1C3MlP67/PGOGMeTs/5d1FV6f8A
ShNdI/LPyXpM5uLXTw8xFOU8kk+3HidpWYb9cyPElVOBm1eTJ9RUNe/LHRNb1B7u6vdQiRwF+pW9
x6NsoApRY1XavU79cshqDEUAHV5dHHJKyZfNPPLnlnRPLmmrp2j2y21qCXYAlmdz1Z2YlmJp3yvJ
klM2W7FhjjjURQTPINrsVdirsVdirsVdirsVdirsVdirsVdirsVQepaRp+pLGl7GZVhbnGA7oA1C
tTwK12PfFUBd+UdKmthbw+paLyLM0TtyIZDGy1Yt1Vv8xXFV8/lLRJrx7t4pPWloJz6037wBOAV/
j3XiaEdD3riq638q6Fb8vRgZA9PUAmmIbi3NeQL0ajbivTFW08raGiSrHA0YmcyScJplPImpIKuC
vU9PE+JxVuDy9Y2+ox3kBeJYgeNsppFyblVivjRz8vltiqaYq7FXYq7FXYq7FXYq7FXYq7FXYq7F
XYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FX
Yq7FX//Z</xmpGImg:image>
- </rdf:li>
- </rdf:Alt>
- </xmp:Thumbnails>
- <xmpTPg:NPages>1</xmpTPg:NPages>
- <xmpTPg:HasVisibleTransparency>True</xmpTPg:HasVisibleTransparency>
- <xmpTPg:HasVisibleOverprint>False</xmpTPg:HasVisibleOverprint>
- <xmpTPg:MaxPageSize rdf:parseType="Resource">
- <stDim:w>1072.000000</stDim:w>
- <stDim:h>918.343750</stDim:h>
- <stDim:unit>Points</stDim:unit>
- </xmpTPg:MaxPageSize>
- <xmpTPg:PlateNames>
- <rdf:Seq>
- <rdf:li>Cyan</rdf:li>
- <rdf:li>Magenta</rdf:li>
- <rdf:li>Yellow</rdf:li>
- <rdf:li>Black</rdf:li>
- </rdf:Seq>
- </xmpTPg:PlateNames>
- <xmpTPg:SwatchGroups>
- <rdf:Seq>
- <rdf:li rdf:parseType="Resource">
- <xmpG:groupName>Default Swatch Group</xmpG:groupName>
- <xmpG:groupType>0</xmpG:groupType>
- </rdf:li>
- </rdf:Seq>
- </xmpTPg:SwatchGroups>
- <illustrator:Type>Document</illustrator:Type>
- <dc:format>application/pdf</dc:format>
- <dc:title>
- <rdf:Alt>
- <rdf:li xml:lang="x-default">Sling Logo - All Styles</rdf:li>
- </rdf:Alt>
- </dc:title>
- <xmpMM:RenditionClass>proof:pdf</xmpMM:RenditionClass>
- <xmpMM:DocumentID>xmp.did:4b7cf1a2-6f01-4ecc-bf59-301b0a63efca</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:ac0c400f-473b-6d44-a6ea-b1aee6648336</xmpMM:InstanceID>
- <xmpMM:OriginalDocumentID>uuid:1b4ea81e-652a-5a46-86f5-fe91fe61a8ed</xmpMM:OriginalDocumentID>
- <xmpMM:DerivedFrom rdf:parseType="Resource">
- <stRef:instanceID>uuid:447124ca-ea6c-dc4a-ace6-eee2f2fdffed</stRef:instanceID>
- <stRef:documentID>uuid:1b4ea81e-652a-5a46-86f5-fe91fe61a8ed</stRef:documentID>
- <stRef:originalDocumentID>uuid:1b4ea81e-652a-5a46-86f5-fe91fe61a8ed</stRef:originalDocumentID>
- <stRef:renditionClass>proof:pdf</stRef:renditionClass>
- </xmpMM:DerivedFrom>
- <xmpMM:History>
- <rdf:Seq>
- <rdf:li rdf:parseType="Resource">
- <stEvt:action>saved</stEvt:action>
- <stEvt:instanceID>xmp.iid:4b7cf1a2-6f01-4ecc-bf59-301b0a63efca</stEvt:instanceID>
- <stEvt:when>2017-03-31T15:26:27-06:00</stEvt:when>
- <stEvt:softwareAgent>Adobe Illustrator CC 2017 (Macintosh)</stEvt:softwareAgent>
- <stEvt:changed>/</stEvt:changed>
- </rdf:li>
- </rdf:Seq>
- </xmpMM:History>
- <pdfx:CreatorVersion>21.0.2</pdfx:CreatorVersion>
- <pdf:Producer>Adobe PDF library 15.00</pdf:Producer>
- </rdf:Description>
- </rdf:RDF>
-</x:xmpmeta>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<?xpacket end="w"?>
endstream
endobj
3 0 obj
<</Count 3/Kids[7 0 R 8 0 R 9 0 R]/Type/Pages>>
endobj
7 0 obj
<</ArtBox[0.0 0.0 1072.0 776.0]/BleedBox[0.0 0.0 1072.0 776.0]/Contents 10 0 R/Group 11 0 R/LastModified(D:20170331152630-06'00')/MediaBox[0.0 0.0 1072.0 776.0]/Parent 3 0 R/PieceInfo<</Illustrator 12 0 R>>/Resources<</ExtGState<</GS0 13 0 R/GS1 14 0 R>>/Properties<</MC0 5 0 R>>/Shading<</Sh0 15 0 R/Sh1 16 0 R/Sh2 17 0 R>>/XObject<</Fm0 18 0 R/Fm1 19 0 R/Fm2 20 0 R/Fm3 21 0 R/Fm4 22 0 R>>>>/TrimBox[0.0 0.0 1072.0 776.0]/Type/Page>>
endobj
8 0 obj
<</ArtBox[0.0 0.0 1072.0 918.344]/BleedBox[0.0 0.0 1072.0 918.344]/Contents 23 0 R/Group 24 0 R/LastModified(D:20170331152630-06'00')/MediaBox[0.0 0.0 1072.0 918.344]/Parent 3 0 R/PieceInfo<</Illustrator 12 0 R>>/Resources<</ExtGState<</GS0 13 0 R/GS1 14 0 R>>/Properties<</MC0 5 0 R>>/Shading<</Sh0 15 0 R/Sh1 16 0 R/Sh2 17 0 R>>/XObject<</Fm0 25 0 R/Fm1 26 0 R/Fm2 27 0 R/Fm3 28 0 R/Fm4 29 0 R>>>>/TrimBox[0.0 0.0 1072.0 918.344]/Type/P
age>>
endobj
9 0 obj
<</ArtBox[0.0 0.0 768.0 392.0]/BleedBox[0.0 0.0 768.0 392.0]/Contents 30 0 R/Group 31 0 R/LastModified(D:20170331152630-06'00')/MediaBox[0.0 0.0 768.0 392.0]/Parent 3 0 R/PieceInfo<</Illustrator 12 0 R>>/Resources<</ExtGState<</GS0 13 0 R/GS1 14 0 R>>/Properties<</MC0 5 0 R>>/Shading<</Sh0 15 0 R/Sh1 16 0 R/Sh2 17 0 R>>/XObject<</Fm0 32 0 R/Fm1 33 0 R/Fm2 34 0 R/Fm3 35 0 R/Fm4 36 0 R>>>>/TrimBox[0.0 0.0 768.0 392.0]/Type/Page>>
endobj
30 0 obj
<</Filter/FlateDecode/Length 6593>>stream
-H���ͮ�
����Ӫb�����l��{!���� ~�|�5W�ݒ�l�mr��X���w}������}��������2m�mlw=����?��M�'�o������ݟ~H�Ͽ�>oy�G��^y˵�9ײ}��u���n���=n����8�n����#^��;�m���v���d�����?��>g�b�=+v�ݽn��a�����/[���n��=�}�g�p�����Z�g���s�mʕ����=[N����oxl��u��z�x�t�n�#3bl���^���i���������{�mO�@ow��R���o�����ZP�^�7+�;Q{�[��i�87���w��]�J8z�X�j5o_}���%�k�����"yɼG wO�j��'�LU��މ� �ũL)�{$��Z�0�9���ȵ�N���̿�r0�>�����f��$�h�;�+�Q�U��,r4��`���'��e�������NF%�D|�w�y�h���wKDSٕ��
���N�y���戣��LҾ_;�h��pPK����*y�N�(�֓���ӻ� ������� Gu!r�rl'�"��T�0.��5J�g���!*c��-�FS�`FLEy��a�*��Wc]��Zՙ�� ?p�+��ߌM(]��׳��_<�����<e康]ԠB �1��E'�!��ͧ���P�"_lS9چ���b#��#/�z��gK-|7:�w�a�J9I�e�d�m
p�U�N�
- z�G�� �t27���.萮/�'`g���8�A|�&�F��y��)����B�������c�y<2\3|?��N�G8R ��<�߀
��)ә��b@��p����w:d���mO3I� �I�]ѧL��H�����Ob!�ԬE�}����hUu|��m�ٱ��`�{ �R���t%G��G�就�)na��0k[�=�up<������BM|�"�i�s.��g_Ltx>����Z����~����1m�~������;Rf�4f������)�B���P^bf�C�+x
P��Ja��#
-�ɚ,��sy�C���4�D^U_��9�h���B�� 4�ص*l��N=9��,YgI���������c(��C(Ƭ8�4�Ν�>.��<�0@�o7=0F���i4�VdVk�WR��8�x�cYLw�1���˅����a@T��q��N�EKX�� �S�@SmP)� C�ˬ@��Om5��P��4@J��m�0�.�
-���9������C-����<{0$�<��%��j]C h4�{Vg��`�5�2�ԗ�²�J\���dz"���0"K!P�509�P�g���8�ʁ&e�ː(���Zz�5�T��ΜY#٤/xA�OU��%¬���&6������<?QX��낱!��4L!aRR!�N��H��?�� K=�\D�ta҅�Xg���x�C�I�����
�+Әw2k�ֳC(@-� ���d&���
-M�C�����֭��,�'=%�q?<ߨ���Y$ �qm5����d>�sҚbD�:ȓd�P��$f
]R�^$.R��P��0������`�Cg:=����;송�_��shՋ��^9�]2� a�j
3*yq<�1���)���X��s��ە�\�G��h8:��������2{���G�(�� A�=:YW��>#yg��#ؠ_��P�KB��&e-� �S��C�3WH>�SwX��W�w�H�!_�;9��U+, ��l���2��qh�ڿK� ���{
� �k���ٱ�W�{�Sص�7E���'�*�v?٨��d�M�K_Cbh ULN�^�s�~v�|���ڧ�-8�<��8�MkBj� 0�&��z��xx�f��RѰ�I3�q7vj�2k|B`�
?E�y9�M���)�ϥ�1dZ��ce�F������F|��Dȱ�d��;��2vRb�H���1�b���!m�T)ѢK������Q�(�{�O�g��*G�Ea*��,xI�1�R�*�P�$ y9� �w��!zy��t��1u
�Y-`���4������1R�7.�M �b��[m���5��ʌ��ώG8l�3�
����t����ښ����XS�sLq�z�1MM��%]$�UM��8�Z;`Z�+.�ceĭ.@5�\a�?�uf�Gl��9� ��@b��+�<+�Y�p�P=��x�ɛY%`�� �bL-՝@ ���6Y�LE���=���@s��<�Z�d]L�, S
�`�_��`��ļ#�ȤvSQ�F1{�Yt�Y�j�A^�j��i��Lŕ�Lx4W�"znD#�kb45s2j��~ُ`�J6&<1��'݂gh|�ˆ������ P����j�w�2�D<r���(�M�4{���A};�Q%A�$�,�b��wuP�v���_�R+ҺI��'2�Pf ���ט�AZ����&/�9JZJC�>Iйt���B�^K��������l����;�=�����H ���I�U�(�$�&qQ��8���`F��%�d�r�t�ٱJ?R~s�Xf^f_�`/�'t�-G_D�2}�ŗY�ֿ�E�u���ӡ~�/�e�[Ir�=O�/�K�1�
Zi�Y��_�y���UA����;3&��$�4?0'�cV������
�zq�t�fM��D;KW��db��1_�(0��lg�06�6�J+���dn����8����jZ��E���{�l)9���w��bb�Qe����5�`�i��P1����D)p�l��aN��[��w�hl2���ݘ<H�ֺ4��.�aw��Cz���̛�*j��a�ܒ'���7�4�N4n�B�t�i�/"��$���`�(&*z�od~�|�"�]�M��ˋ���B� #]�$��3_;D?,��ۧ�拯�������~@K���@T�Fd:�������&�t�>Ez���/(�������w;3phz��Mt�P� 6�Z�p�.^���� ˽@|H�y��b�e]�o��rt;�&�f S�ɬ����l
-i�$"l� Y*y��
мp���砈��8�(�>�CC�Ȭ�)о>,�&D�C���RoRb�K�HVSA!%:c���X�����ML��S��9���Z��A+'s[aV�x��x����<�Y�;N;
-S
-�!*���A
�Y[���q�!2��%�OH��*����_��&(�Q����,Ad']�ك�~y-�F�ck��1ݷ���r(W �PP�3��Ӈ��fk5��^mE�v��X�c�š�Jb�Nr��t? CH����C��*Es�U�L�Q���o��}R�H���B'еdh�=�4ħ�t4�Z��7��9h�c��R�9�ڔ�'�Z��V9M$�Q�-"��� ٥L��o�X�m7��q/�^����������Dh��rIB5����!�zq .S��9N;���H�:y��F+���n��j�ƕQ*��m 刍�8�n
-��Z��h[߂-B.���*� ܛC�[=!��ɢ[���.�"��q��v��[1D�(+��ZގOp��R�+��! G��o֓�?�43��_{�,���1��9{���ҥj��8C����Rc�ZfU;=���7�6�ZnwH��t�@ʂ��&�f�&�G\B}��n�ӎ�
-\�l"¹J�q�f�\��!"L�.GW �t�A针O��X)�0��K�+��XX�P�6��*(�͡��D��bu)�1D�x�6LN�})�� g$s���sA�*�3D���W\��z8�C��T���މ�&/��&�!�KX�� �w�Er5k%�X OM��B"�XN����7[e^�VUb3E8}iV�*�A����P��ü�D�6�.�7#o�Ł�6��i�*��X�@I�З��TsBӄ�>m�E�����i})wph$�zo^�9�p�4����s�V)W�q},�r\ RL�V֔X�+��dP�4�mw�=�f
-
-ETD���;9���������d\Ҿ����M�r�l��v��}���r��7����|Ǥ��y[F�vH
��\H������'6O��;wiQ�*�����߀���nk5t����е��S:���$�(�ƙ�������S�-dj&U�ZLq��Ԛ�Y�;N;&�ƑE��R��LO�l˦:���қ4]�i�To��jF�+��$�%K�P7��E�. �B���Hf����%��;�/��& "��ܷ5�%O�@�O�y���'���8��
7P0T�N)'R���9�b���97�3�M�&b:%3ŮTOņ�.Յ��7[�dJ�g(�����9t�V�U-���Tn�R���������RY�� �e��6����e|.��#��t��0�]�vMX�Iz�4�?o�D� 餧~��-�� "�����}^柏�H��V�O��pP��_�����S����D����C�(�����}���������:>=���?��{y����xB�m��n <^s��]�н��
�����4�r\���e��_�����|�~h]c�Ժ�
د���gKėy�ř�Y��#[D<��FQ�i[~ӆ�6�����ok�M���L]W�n��r 3��n$3C�G6��(���i��|�a��ݎ�e�r��������L�t� m"
-�����J�}�%*%�L��2"��|����R_�R��a�/�a�����������e�.�u�y\�����������MB�i��q%��r�
-���y��&�x�'�u�ST�ģ��/6.rl�������Q����b2���Y0��R���q�5� 9��(��
|�^��k�� ��� �b@� ���(���uA>[�#Q��٩��7R{qY�1]�c�cJ0@�]��D�is
&�J���pE�����8���� 9�����dy.�l��ڤ��l���ó �����>DZ�I>�Bf��G����&@�~����̓�Z����]A�*":�\�z
-�f���}��'���U4x�7���%�2�����,�0�?Q��ʰ��O�!���AO�l=G-~���"�_�7d,�5�vJq3?��е�(����̬��/�R���.f.�������)U�͂Eu�>!:Y�I��������dANF��yP�4eO���,fEY�N�T7�̦4n�>��d��'
-Á'��-m�Y�"�"�O^�+!(��C�xKs4bѺ�\W�;D��r秝�]��g��
>��`�|��J]ٽ�*�x|�J��K捩
-#���ET��j�
�Ux�*̇��h^�CK��s�t�'�C����Z��Y�NN��P�6�Ko�6�C�T
�[��.Q�J|��~/���#�ʒ���j6�
��[�z\)������J`��r7bU��-pIZ�A[�+v!�DZ�tTq[=T�M�ђD%��P�NҢ>��ד��W���=%i�B9�QP\�Ծz����'��s���v�#ǑQ��)�T�*��sN!g�ߞ�~v�Yl�(,���LYoS{�R�d��kIq��*�}WlI�R,<��HA p�J�@�r\s氵�n�+<��{.�9�7��P�9w�,�W@��������{O8���2Ap�Y�<g���
-x2�Z�t`���V�:�s����R��j-d�D�����$'���\xฒ�I��ǂw�T��]��@���8M�h���;]��KY������A�F�M�c��m�<@�K�i9��\I�� o숤�n�X� ����mIŠΉL����� ����$����P��B����/O���J�X��͍x�Z.o�Q`C�C �S��w�VQ�Ό�pm!K$���
-bD���hb���;��j��؉�.\�{�+XE2ᐻ��k�&\r�g?�]�:��h��N����->��Wj���̮=�AF����<x�����VkN�Օ���l����;&l�ei��JF�!��[�R�,���_2˃dtg��
�pH�[�Ў�U:�QLZ���7���P��K8[hU�厖�%a��m���GƧ��(�����Sg� ���Ge��(�Q'ί��0TL���f���qA��'�8x��V(&-R�ꇌ[�y�7��| ��w�����%�cOr ����sAd�����߳��X�a����k�u�5s~D���� Bq�f�֙ )}�C��#��L�M��xF���Ѷ!W�g�m� 2i��eL'��t�.*h���^
I*m�L��n�T�A�����Z��%��R)�l��rQ�? >�aBQ�X-��4��J��$����T�����%��=.Kq�O^�������tۿI�l���ٻ!������8&�ӈ �C!��X�a1����,&3
���7��;>���}��P��*��~]�6I�������>'��=��b�_Rͽ=T���6a��s��=6;ח�ں�e��ϡCQ�m�������Ͽ���_� �`M�
endstream
endobj
31 0 obj
<</CS/DeviceRGB/I false/K false/S/Transparency>>
endobj
32 0 obj
<</BBox[300.005 74.9456 302.443 71.3723]/Group 37 0 R/Length 218/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 13 0 R>>>>/Subtype/Form>>stream
-0.745 0.125 0.18 rg
-/GS0 gs
-q 1 0 0 1 300.0058 74.9454 cm
-0 0 m
-0.783 -1.147 1.6 -2.337 2.415 -3.555 c
-2.42 -3.566 2.432 -3.562 2.438 -3.573 c
-2.045 -2.95 1.64 -2.333 1.234 -1.744 c
-0.829 -1.155 0.411 -0.571 0 0 c
-f
-Q
-
endstream
endobj
33 0 obj
<</BBox[280.446 73.7369 282.365 70.9116]/Group 38 0 R/Length 214/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 13 0 R>>>>/Subtype/Form>>stream
-0.745 0.125 0.18 rg
-/GS0 gs
-q 1 0 0 1 282.3427 70.9297 cm
-0 0 m
-0 0 l
-0.017 -0.007 0.022 -0.019 y
--0.096 0.182 -0.221 0.363 -0.35 0.558 c
--0.84 1.333 -1.364 2.093 -1.896 2.808 c
--1.274 1.895 -0.643 0.959 0 0 c
-f
-Q
-
endstream
endobj
34 0 obj
<</BBox[301.229 73.196 302.431 71.367]/Group 39 0 R/Length 141/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 13 0 R>>>>/Subtype/Form>>stream
-0.745 0.125 0.18 rg
-/GS0 gs
-q 1 0 0 1 301.2284 73.1964 cm
-0 0 m
-0.411 -0.601 0.811 -1.207 1.203 -1.829 c
-0.811 -1.207 0.411 -0.601 0 0 c
-f
-Q
-
endstream
endobj
35 0 obj
<</BBox[281.993 71.4876 282.365 70.9116]/Group 40 0 R/Length 137/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 13 0 R>>>>/Subtype/Form>>stream
-0.745 0.125 0.18 rg
-/GS0 gs
-q 1 0 0 1 282.3651 70.9112 cm
-0 0 m
--0.118 0.2 -0.243 0.382 -0.372 0.576 c
--0.243 0.382 -0.118 0.2 0 0 c
-f
-Q
-
endstream
endobj
36 0 obj
<</BBox[282.342 70.9296 282.348 70.918]/Group 41 0 R/Length 116/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 13 0 R>>>>/Subtype/Form>>stream
-0.745 0.125 0.18 rg
-/GS0 gs
-q 1 0 0 1 282.3476 70.918 cm
-0 0 m
--0.005 0.012 -0.005 0.012 0 0 c
--0.005 0.012 l
-h
-f
-Q
-
endstream
endobj
41 0 obj
<</I true/K false/S/Transparency/Type/Group>>
endobj
13 0 obj
<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 1.0/op false>>
endobj
40 0 obj
<</I true/K false/S/Transparency/Type/Group>>
endobj
39 0 obj
<</I true/K false/S/Transparency/Type/Group>>
endobj
38 0 obj
<</I true/K false/S/Transparency/Type/Group>>
endobj
37 0 obj
<</I true/K false/S/Transparency/Type/Group>>
endobj
15 0 obj
<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 42 0 R/ShadingType 2>>
endobj
16 0 obj
<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 43 0 R/ShadingType 2>>
endobj
17 0 obj
<</AntiAlias false/ColorSpace/DeviceRGB/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 44 0 R/ShadingType 2>>
endobj
44 0 obj
<</Bounds[0.0954839 0.7882 0.9487]/Domain[0.0 1.0]/Encode[0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0]/FunctionType 3/Fun
ctions[45 0 R 46 0 R 47 0 R 48 0 R]>>
endobj
45 0 obj
<</C0[0.156863 0.14902 0.384314]/C1[0.4 0.180392 0.552941]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
46 0 obj
<</C0[0.4 0.180392 0.552941]/C1[0.623529 0.12549 0.392157]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
47 0 obj
<</C0[0.623529 0.12549 0.392157]/C1[0.803922 0.12549 0.196078]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
48 0 obj
<</C0[0.803922 0.12549 0.196078]/C1[0.803922 0.12549 0.196078]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
43 0 obj
<</Bounds[0.3233 0.6302 0.7514]/Domain[0.0 1.0]/Encode[0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0]/FunctionType 3/Functions[49 0 R 50 0 R 51 0 R 52 0 R]>>
endobj
49 0 obj
<</C0[0.619608 0.12549 0.392157]/C1[0.619608 0.12549 0.392157]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
50 0 obj
<</C0[0.619608 0.12549 0.392157]/C1[0.788235 0.12549 0.215686]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
51 0 obj
<</C0[0.788235 0.12549 0.215686]/C1[0.803922 0.137255 0.207843]/Domain[0.0 1.0]/Fun
ctionType 2/N 1.0>>
endobj
52 0 obj
<</C0[0.803922 0.137255 0.207843]/C1[0.913725 0.470588 0.14902]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
42 0 obj
<</Bounds[0.3123 0.8383]/Domain[0.0 1.0]/Encode[0.0 1.0 0.0 1.0 0.0 1.0]/FunctionType 3/Functions[53 0 R 54 0 R 55 0 R]>>
endobj
53 0 obj
<</C0[0.964706 0.6 0.137255]/C1[0.968627 0.603922 0.137255]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
54 0 obj
<</C0[0.968627 0.603922 0.137255]/C1[0.913725 0.470588 0.14902]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
55 0 obj
<</C0[0.913725 0.470588 0.14902]/C1[0.913725 0.470588 0.14902]/Domain[0.0 1.0]/FunctionType 2/N 1.0>>
endobj
5 0 obj
<</Intent 56 0 R/Name(Layer 1)/Type/OCG/Usage 57 0 R>>
endobj
56 0 obj
[/View/Design]
endobj
57 0 obj
<</CreatorInfo<</Creator(Adobe Illustrator 21.0)/Subtype/Artwork>>>>
endobj
14 0 obj
<</AIS false/BM/Normal/CA 0.350006/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.350006/op false>>
endobj
12 0 obj
<</LastModified(D:20170331152630-06'00')/Pr
ivate 58 0 R>>
endobj
58 0 obj
<</AIMetaData 59 0 R/AIPrivateData1 60 0 R/AIPrivateData2 61 0 R/AIPrivateData3 62 0 R/ContainerVersion 11/CreatorVersion 21/NumBlock 3/RoundtripStreamType 1/RoundtripVersion 17>>
endobj
59 0 obj
<</Length 1411>>stream
-%!PS-Adobe-3.0
%%Creator: Adobe Illustrator(R) 17.0
%%AI8_CreatorVersion: 21.0.2
%%For: (Chris Millar) ()
%%Title: (Sling Logo.ai)
%%CreationDate: 3/31/17 3:26 PM
%%Canvassize: 16383
%%BoundingBox: -2026 -451 2287 468
%%HiResBoundingBox: -2025.17966406719 -450.61375427245 2286.86142014011 467.72999572755
%%DocumentProcessColors: Cyan Magenta Yellow Black
%AI5_FileFormat 13.0
%AI12_BuildNumber: 242
%AI3_ColorUsage: Color
%AI7_ImageSettings: 0
%%RGBProcessColor: 0 0 0 ([Registration])
%AI3_Cropmarks: -253.159121963538 -450.61375427245 818.840878036463 467.72999572755
%AI3_TemplateBox: 300.5 76.2299957275391 300.5 76.2299957275391
%AI3_TileBox: -95.1591219635375 -279.44187927245 638.840878036463 296.55812072755
%AI3_DocumentPreview: None
%AI5_ArtSize: 14400 14400
%AI5_RulerUnits: 2
%AI9_ColorModel: 1
%AI5_ArtFlags: 0 0 0 1 0 0 1 0 0
%AI5_TargetResolution: 800
%AI5_NumLayers: 1
%AI17_Begin_Content_if_version_gt:17 1
%AI9_OpenToView: -4403 3715.72999572754 0.125 1495 997 26 0 0 110 212
0 0 0 1 1 0 1 1 0 1
%AI17_Alternate_Content
%AI9_OpenToView: -4403 3715.72999572754 0.125 1495 997 26 0 0 110 212 0 0 0 1 1 0 1 1 0 1
%AI17_End_Versioned_Content
%AI5_OpenViewLayers: 7
%%PageOrigin:-5 -320.270004272461
%AI7_GridSettings: 72 8 72 8 1 0 0.800000011920929 0.800000011920929 0.800000011920929 0.899999976158142 0.899999976158142 0.899999976158142
%AI9_Flatten: 1
%AI12_CMSettings: 00.MS
%%EndComments
endstream
endobj
60 0 obj
<</Length 3766>>stream
-%%BoundingBox: -2026 -451 2287 468
%%HiResBoundingBox: -2025.17966406719 -450.61375427245 2286.86142014011 467.72999572755
%AI7_Thumbnail: 128 28 8
%%BeginData: 3580 Hex Bytes
%0000330000660000990000CC0033000033330033660033990033CC0033FF
%0066000066330066660066990066CC0066FF009900009933009966009999
%0099CC0099FF00CC0000CC3300CC6600CC9900CCCC00CCFF00FF3300FF66
%00FF9900FFCC3300003300333300663300993300CC3300FF333300333333
%3333663333993333CC3333FF3366003366333366663366993366CC3366FF
%3399003399333399663399993399CC3399FF33CC0033CC3333CC6633CC99
%33CCCC33CCFF33FF0033FF3333FF6633FF9933FFCC33FFFF660000660033
%6600666600996600CC6600FF6633006633336633666633996633CC6633FF
%6666006666336666666666996666CC6666FF669900669933669966669999
%6699CC6699FF66CC0066CC3366CC6666CC9966CCCC66CCFF66FF0066FF33
%66FF6666FF9966FFCC66FFFF9900009900339900669900999900CC9900FF
%9933009933339933669933999933CC9933FF996600996633996666996699
%9966CC9966FF9999009999339999669999999999CC9999FF99CC0099CC33
%99CC6699CC9999
CCCC99CCFF99FF0099FF3399FF6699FF9999FFCC99FFFF
%CC0000CC0033CC0066CC0099CC00CCCC00FFCC3300CC3333CC3366CC3399
%CC33CCCC33FFCC6600CC6633CC6666CC6699CC66CCCC66FFCC9900CC9933
%CC9966CC9999CC99CCCC99FFCCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF
%CCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFFFF0033FF0066FF0099FF00CC
%FF3300FF3333FF3366FF3399FF33CCFF33FFFF6600FF6633FF6666FF6699
%FF66CCFF66FFFF9900FF9933FF9966FF9999FF99CCFF99FFFFCC00FFCC33
%FFCC66FFCC99FFCCCCFFCCFFFFFF33FFFF66FFFF99FFFFCC110000001100
%000011111111220000002200000022222222440000004400000044444444
%550000005500000055555555770000007700000077777777880000008800
%000088888888AA000000AA000000AAAAAAAABB000000BB000000BBBBBBBB
%DD000000DD000000DDDDDDDDEE000000EE000000EEEEEEEE0000000000FF
%00FF0000FFFFFF0000FF00FFFFFF00FFFFFF
%524C45FDFCFFFDFCFFFD8EFFAF845A845A847E845A847E845A847E845A84
%7E84A8A8A8FD1EFFAF7E845A847E845A847E845A847E845A847E8484FFA8
%FD19FFA8847E845A847E845A847E845A847E845A847EA9A8A8FD06FF350D
%5A3559355A355A2F5A35592F5A35592F350DAF7DA8F
D1DFFA90CFD04355A
%355A355A35592F5A35592F5A0D5AA8A8FD18FF840D2F5A355A355A355A2F
%5A35592F5A3559352F5AFF7DFD05FF840CFD04FF84A8FFA8FD09FFA82FA8
%FD1FFF2F59FFFFFFAF59FFA8AFFD09FF8435FD1AFF2F59FFFFFFA884FFFF
%A8FD09FF595AFD07FFA80DA8FFFFFF0D84FF84FD0AFF2FFD20FF5A2FFFFF
%FF840DFFA984FD09FF845AFD1AFF355AFFFFFF840DFF84A9FD09FF845AFD
%08FF350D35FFFF2F7EA959FF7E843584FFFF59353535AFFD1FFFA80D0C84
%FFA80CFF59A8A884595AA8FFA859353559FD1AFFA90C2F7EFF7E2FA85AA8
%AF595A59FFFFA92F590D84FD09FF842F0DFF2F84840DFF352F600DAF5935
%843535FD22FF840C84A82FAF3559AF06602F59A93559840CA9FD1CFF590D
%7EA92FFF0D84840D593559FF0C845A0DA8FD0BFF0D59357EFF0CFF0D84FF
%35842F7EFF842FA8FD22FF840C840CFF355A840DFFA82F840CFFFF3559FD
%1DFF592F5935FF5A59A80DFF7E35592FFFFF0D84FD08FFAFFFAF0C842FA8
%AF35FF3584FF2FA9355AFF5A2FFD21FFAFFF5A358435FF5A59AF0DFFA835
%A83584AF0DA9FD1AFFA8FFFF5A2F842FFF35848435FF852FA90DAFA80D84
%FD07FFAF0C350C59FF365AFF0DFF2F84FF35A8A90C352FFD21FF590D0D0D
%84AF0DFF5960A82FFFA92FFF352F0D5AFD1BFF5A0C2F0CA9
8435FF5A5AA9
%2FFF7E35FF590C355AFD08FFA88484AFFFFFA8CACAA8A2A9A8FFA9FF7E35
%595A84FD20FF8484A9AFFFCAA8CACAA1CAA8FD04FF35355A59AFFD1AFF84
%A884FFFFCFA8CAA8CAA8A9FFFFA9FF2F5A3560A9FD07FF842FFFFFC998BB
%93938D936F7077FFA8A97E84590DA8FD1FFF2FA8FFFFC1BB99998D936994
%4CA8CBFF84847E352FFD19FFA835A8FFFFC298BB93938D947071A8FFA8A8
%5A840C59FD07FF840D596083C89FBC9394939A7077A2FFA85A593535FD20
%FF5A2F5A5AA7A0C299949394707777FFA984595A2F84FD1AFF2F355984A7
%C299BC9394939B71A2A8FF7E5A353584FD08FF7E845984A8FFCACAA2CAA8
%FFCBFFFFAF5A8484FD21FF84845A8484AFCAFFA8CAA2FFA8FFFFFF84847E
%FD1CFFA87E845AA9A9FFA8CAA2CAA8FD04FF845A84A8FDBDFFA8A87DA8A8
%A8FFFD0EA8FD6BFFA87DA8A8A87DFF7DA884A87DA8A8A87DFFA8A87EA8FD
%6BFFA8FFFFFFA8A8FFFFA8FFFFFFA8FD06FFA8A8FDFCFFFDFCFFFDFCFFFD
%3CFFFF
%%EndData
endstream
endobj
61 0 obj
<</Length 65536>>stream
-%AI12_CompressedDatax�ܽ�B�H� z_�w Eٲ��H�Y���2���>���ldC�3s�/��(i��k���h�ZK
-�aKI�)"�Fc�9�sa�i��ߟM�c�Q�z7Lr) 'ن��VOz�A.L�)"E�K};V�{��y��o�wñ]xQ�M�
-���{��pe�1L5{�s�ЉԜ�{:M�i��9�
W������d��xK�t�����lЁ~��_�p�"�m�ɐa��ra��B�r�Z�,�ˤH�gY�`9�G�!R,Is��(&��Ϧ�,�P�$ }q)��y>�Q\&�J���[L��a[�L
-��p<Ʌ7����i��~�gX�7�_!�W�!��
-��9
�4¢pBR
q��w.f�-�F1��n�.o&�t�~Gs��o���L�0 �(q]�À�{�V>z�p�ח]���p��M&2t���$E�,�����Ȓ�T�!�\��Y��1���+ߣ>�
�&�T&̱)JoF�����-*m��y@\���)�!���Hoų�L&KR�iDy�?zʟ���p��4�Ӛ�EC�O������o�)��W�p>�(}h�_�71��C?����C��
��)�����[A��{#��4 �����7�P���1́ ��8.Gʠ>��SI�0͑%�0�"�L�τy��,�q�H%���4~j�Se<