svn commit: r1523940 - /sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceWebConsolePlugin.java
Author: fmeschbe Date: Tue Sep 17 07:26:09 2013 New Revision: 1523940 URL: http://svn.apache.org/r1523940 Log: Register web console plugin with the Sling category Modified: sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceWebConsolePlugin.java Modified: sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceWebConsolePlugin.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceWebConsolePlugin.java?rev=1523940r1=1523939r2=1523940view=diff == --- sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceWebConsolePlugin.java (original) +++ sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceWebConsolePlugin.java Tue Sep 17 07:26:09 2013 @@ -179,6 +179,7 @@ class BundleResourceWebConsolePlugin ext props.put(Constants.SERVICE_PID, getClass().getName()); props.put(felix.webconsole.label, LABEL); props.put(felix.webconsole.title, Bundle Resource Provider); +props.put(felix.webconsole.category, Sling); serviceRegistration = context.registerService( Servlet.class.getName(), this, props);
svn commit: r1523941 - /sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java
Author: fmeschbe Date: Tue Sep 17 07:27:29 2013 New Revision: 1523941 URL: http://svn.apache.org/r1523941 Log: Register web console plugin with the Sling category Modified: sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java Modified: sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java?rev=1523941r1=1523940r2=1523941view=diff == --- sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java (original) +++ sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java Tue Sep 17 07:27:29 2013 @@ -1155,6 +1155,7 @@ public class SlingServletResolver props.put(felix.webconsole.label, servletresolver); props.put(felix.webconsole.title, Sling Servlet Resolver); props.put(felix.webconsole.css, /servletresolver/res/ui/styles.css); +props.put(felix.webconsole.category, Sling); service = context.registerService( new String[] { javax.servlet.Servlet }, this, props); @@ -1249,12 +1250,12 @@ public class SlingServletResolver servlets = Collections.singleton(resource); } else { final ResourceCollector locationUtil = ResourceCollector.create( -resource, -defaultWorkspaceName, -requestPathInfo.getExtension(), -executionPaths, -defaultExtensions, -method, +resource, +defaultWorkspaceName, +requestPathInfo.getExtension(), +executionPaths, +defaultExtensions, +method, requestPathInfo.getSelectors()); servlets = locationUtil.getServlets(resourceResolver); }
svn commit: r878776 - /websites/production/sling/content/
Author: ieb Date: Tue Sep 17 08:11:23 2013 New Revision: 878776 Log: Org change for self Added: websites/production/sling/content/ - copied from r878775, websites/staging/sling/trunk/content/
svn commit: r1523950 - /sling/site/trunk/content/project-information/project-team.mdtext
Author: ieb Date: Tue Sep 17 08:10:51 2013 New Revision: 1523950 URL: http://svn.apache.org/r1523950 Log: Corrected org Modified: sling/site/trunk/content/project-information/project-team.mdtext Modified: sling/site/trunk/content/project-information/project-team.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/project-information/project-team.mdtext?rev=1523950r1=1523949r2=1523950view=diff == --- sling/site/trunk/content/project-information/project-team.mdtext (original) +++ sling/site/trunk/content/project-information/project-team.mdtext Tue Sep 17 08:10:51 2013 @@ -33,7 +33,7 @@ The following is a list of developers wi | thecarlhall | Carl Hall | Hallway Technologies | Java Developer | -5 | | vramdal (*) | Vidar Ramdal | | Java Developer | \+1 | -Committers marked with an asterisk (*) are also members of the Sling Project Management Commitee ([PMC](http://www.apache.org/dev/pmc.html)) as defined in [Apache Sling Community Roles and Processes]({{ refs.apache-sling-community-roles-and-processes.path }}) +Committers marked with an asterisk (*) are also members of the Sling Project Management Commitee ([PMC](http://www.apache.org/dev/pmc.html)) as defined in [Apache Sling Community Roles and Processes] ## Emeritus Committers and PMC members
svn commit: r878773 - in /websites/staging/sling/trunk/content: ./ project-information/project-team.html
Author: buildbot Date: Tue Sep 17 08:10:35 2013 New Revision: 878773 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/project-information/project-team.html Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Sep 17 08:10:35 2013 @@ -1 +1 @@ -1522066 +1523948 Modified: websites/staging/sling/trunk/content/project-information/project-team.html == --- websites/staging/sling/trunk/content/project-information/project-team.html (original) +++ websites/staging/sling/trunk/content/project-information/project-team.html Tue Sep 17 08:10:35 2013 @@ -201,7 +201,7 @@ tr tdieb (*)/td tdIan Boston/td -tdUniversity of Cambridge/td +tdAdobe/td tdJava Developer/td td/td /tr @@ -290,7 +290,7 @@ h2 id=contributorsContributors/h2 pThere are no contributors listed for this project./p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1500732 by dklco on Mon, 8 Jul 2013 13:53:28 + +Rev. 1523948 by ieb on Tue, 17 Sep 2013 08:10:25 + /div div class=trademarkFooter Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
svn commit: r878775 - in /websites/staging/sling/trunk/content: ./ project-information/project-team.html
Author: buildbot Date: Tue Sep 17 08:10:58 2013 New Revision: 878775 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/project-information/project-team.html Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Sep 17 08:10:58 2013 @@ -1 +1 @@ -1523948 +1523950 Modified: websites/staging/sling/trunk/content/project-information/project-team.html == --- websites/staging/sling/trunk/content/project-information/project-team.html (original) +++ websites/staging/sling/trunk/content/project-information/project-team.html Tue Sep 17 08:10:58 2013 @@ -256,7 +256,7 @@ /tr /tbody /table -pCommitters marked with an asterisk (*) are also members of the Sling Project Management Commitee (a href=http://www.apache.org/dev/pmc.html;PMC/a) as defined in a href=/project-information/apache-sling-community-roles-and-processes.htmlApache Sling Community Roles and Processes/a/p +pCommitters marked with an asterisk (*) are also members of the Sling Project Management Commitee (a href=http://www.apache.org/dev/pmc.html;PMC/a) as defined in [Apache Sling Community Roles and Processes]/p h2 id=emeritus-committers-and-pmc-membersEmeritus Committers and PMC members/h2 pThe following list of former committers and/or PMC members have chosen to go emeritus. We are still thankful for their help and guidance during earlier phases of the Sling project./p table @@ -290,7 +290,7 @@ h2 id=contributorsContributors/h2 pThere are no contributors listed for this project./p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1523948 by ieb on Tue, 17 Sep 2013 08:10:25 + +Rev. 1523950 by ieb on Tue, 17 Sep 2013 08:10:51 + /div div class=trademarkFooter Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
svn commit: r878777 - /websites/production/sling/content/
Author: ieb Date: Tue Sep 17 08:11:42 2013 New Revision: 878777 Log: Org change for self Added: websites/production/sling/content/ - copied from r878775, websites/staging/sling/trunk/content/
svn commit: r1524015 - /sling/site/trunk/content/project-information/project-team.mdtext
Author: rombert Date: Tue Sep 17 12:45:32 2013 New Revision: 1524015 URL: http://svn.apache.org/r1524015 Log: Team information: update entry for rombert Modified: sling/site/trunk/content/project-information/project-team.mdtext Modified: sling/site/trunk/content/project-information/project-team.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/project-information/project-team.mdtext?rev=1524015r1=1524014r2=1524015view=diff == --- sling/site/trunk/content/project-information/project-team.mdtext (original) +++ sling/site/trunk/content/project-information/project-team.mdtext Tue Sep 17 12:45:32 2013 @@ -28,7 +28,7 @@ The following is a list of developers wi | juanjo (*) | Juan José Vázquez Delgado | | Java Developer | | | mykee (*) | Mike Müller | MySign AG | | \+1 | | pauls (*) | Karl Pauls | | Java Developer | \+1 | -| rombert | Robert Munteanu | | Java Developer | \+1 | +| rombert | Robert Munteanu | Adobe | Java Developer | Europe/Bucharest | | stefanegli | Stefan Egli | | Java Developer | \+1 | | thecarlhall | Carl Hall | Hallway Technologies | Java Developer | -5 | | vramdal (*) | Vidar Ramdal | | Java Developer | \+1 |
svn commit: r878808 - in /websites/staging/sling/trunk/content: ./ project-information/project-team.html
Author: buildbot Date: Tue Sep 17 12:45:45 2013 New Revision: 878808 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/project-information/project-team.html Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Sep 17 12:45:45 2013 @@ -1 +1 @@ -1524013 +1524015 Modified: websites/staging/sling/trunk/content/project-information/project-team.html == --- websites/staging/sling/trunk/content/project-information/project-team.html (original) +++ websites/staging/sling/trunk/content/project-information/project-team.html Tue Sep 17 12:45:45 2013 @@ -229,9 +229,9 @@ tr tdrombert/td tdRobert Munteanu/td -td/td +tdAdobe/td tdJava Developer/td -td+1/td +tdEurope/Bucharest/td /tr tr tdstefanegli/td @@ -297,7 +297,7 @@ h2 id=contributorsContributors/h2 pThere are no contributors listed for this project./p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1524013 by amitgupt on Tue, 17 Sep 2013 12:45:01 + +Rev. 1524015 by rombert on Tue, 17 Sep 2013 12:45:32 + /div div class=trademarkFooter Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
svn commit: r1524043 - /sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext
Author: bdelacretaz Date: Tue Sep 17 13:48:21 2013 New Revision: 1524043 URL: http://svn.apache.org/r1524043 Log: tweak images Modified: sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext Modified: sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext?rev=1524043r1=1524042r2=1524043view=diff == --- sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext (original) +++ sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext Tue Sep 17 13:48:21 2013 @@ -82,7 +82,7 @@ checks that have a non-OK status. The screenshot below shows an example, as of svn revision 1513462. -img src=sling-hc-plugin.jpg width=700 alt=Health Check Webconsole Plugin/ +img src=sling-hc-plugin.jpg max-width=700 alt=Health Check Webconsole Plugin/ ## 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' @@ -91,4 +91,4 @@ The MBean gives access to the `Result` a See the example configurations of the `org.apache.sling.hc.samples` for more details. -img src=jconsole-hc.jpg width=700 alt=JConsole showing Sling Health Check MBeans/ +img src=jconsole-hc.jpg max-width=700 alt=JConsole showing Sling Health Check MBeans/
svn commit: r878816 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/sling-health-check-tool.html
Author: buildbot Date: Tue Sep 17 13:48:53 2013 New Revision: 878816 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Sep 17 13:48:53 2013 @@ -1 +1 @@ -1524040 +1524043 Modified: websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html == --- websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html (original) +++ websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html Tue Sep 17 13:48:53 2013 @@ -154,14 +154,14 @@ based on their tags (positive and negati pThe DEBUG logs of health checks can optionally be displayed, and an option allows for showing only health checks that have a non-OK status./p pThe screenshot below shows an example, as of svn revision 1513462./p -pimg src=sling-hc-plugin.jpg width=700 alt=Health Check Webconsole Plugin//p +pimg src=sling-hc-plugin.jpg max-width=700 alt=Health Check Webconsole Plugin//p h2 id=jmx-access-to-health-checksJMX access to health checks/h2 pIf the codeorg.apache.sling.hc.jmx/code bundle is active, a JMX MBean is created for each codeHealthCheck/code 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'/p pThe MBean gives access to the codeResult/code and the log, as shown on the screenshot below. /p pSee the example configurations of the codeorg.apache.sling.hc.samples/code for more details./p -pimg src=jconsole-hc.jpg width=700 alt=JConsole showing Sling Health Check MBeans//p +pimg src=jconsole-hc.jpg max-width=700 alt=JConsole showing Sling Health Check MBeans//p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1524040 by bdelacretaz on Tue, 17 Sep 2013 13:44:59 + +Rev. 1524043 by bdelacretaz on Tue, 17 Sep 2013 13:48:21 + /div div class=trademarkFooter Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
svn commit: r1524044 - /sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext
Author: bdelacretaz Date: Tue Sep 17 13:52:45 2013 New Revision: 1524044 URL: http://svn.apache.org/r1524044 Log: tweak images Modified: sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext Modified: sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext?rev=1524044r1=1524043r2=1524044view=diff == --- sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext (original) +++ sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext Tue Sep 17 13:52:45 2013 @@ -82,7 +82,7 @@ checks that have a non-OK status. The screenshot below shows an example, as of svn revision 1513462. -img src=sling-hc-plugin.jpg max-width=700 alt=Health Check Webconsole Plugin/ +img src=sling-hc-plugin.jpg style=max-width:700px alt=Health Check Webconsole Plugin/ ## 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' @@ -91,4 +91,4 @@ The MBean gives access to the `Result` a See the example configurations of the `org.apache.sling.hc.samples` for more details. -img src=jconsole-hc.jpg max-width=700 alt=JConsole showing Sling Health Check MBeans/ +img src=jconsole-hc.jpg style=max-width:700px alt=JConsole showing Sling Health Check MBeans/
svn commit: r878817 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/sling-health-check-tool.html
Author: buildbot Date: Tue Sep 17 13:53:09 2013 New Revision: 878817 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Sep 17 13:53:09 2013 @@ -1 +1 @@ -1524043 +1524044 Modified: websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html == --- websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html (original) +++ websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html Tue Sep 17 13:53:09 2013 @@ -154,14 +154,14 @@ based on their tags (positive and negati pThe DEBUG logs of health checks can optionally be displayed, and an option allows for showing only health checks that have a non-OK status./p pThe screenshot below shows an example, as of svn revision 1513462./p -pimg src=sling-hc-plugin.jpg max-width=700 alt=Health Check Webconsole Plugin//p +pimg src=sling-hc-plugin.jpg style=max-width:700px alt=Health Check Webconsole Plugin//p h2 id=jmx-access-to-health-checksJMX access to health checks/h2 pIf the codeorg.apache.sling.hc.jmx/code bundle is active, a JMX MBean is created for each codeHealthCheck/code 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'/p pThe MBean gives access to the codeResult/code and the log, as shown on the screenshot below. /p pSee the example configurations of the codeorg.apache.sling.hc.samples/code for more details./p -pimg src=jconsole-hc.jpg max-width=700 alt=JConsole showing Sling Health Check MBeans//p +pimg src=jconsole-hc.jpg style=max-width:700px alt=JConsole showing Sling Health Check MBeans//p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1524043 by bdelacretaz on Tue, 17 Sep 2013 13:48:21 + +Rev. 1524044 by bdelacretaz on Tue, 17 Sep 2013 13:52:45 + /div div class=trademarkFooter Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
svn commit: r1524056 - in /sling/site/trunk/content/documentation/bundles: jconsole-hc.jpg sling-hc-plugin.jpg
Author: bdelacretaz Date: Tue Sep 17 14:11:02 2013 New Revision: 1524056 URL: http://svn.apache.org/r1524056 Log: fix mixed up images Modified: sling/site/trunk/content/documentation/bundles/jconsole-hc.jpg sling/site/trunk/content/documentation/bundles/sling-hc-plugin.jpg Modified: sling/site/trunk/content/documentation/bundles/jconsole-hc.jpg URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/jconsole-hc.jpg?rev=1524056r1=1524055r2=1524056view=diff == Binary files - no diff available. Modified: sling/site/trunk/content/documentation/bundles/sling-hc-plugin.jpg URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/sling-hc-plugin.jpg?rev=1524056r1=1524055r2=1524056view=diff == Binary files - no diff available.
svn commit: r1524048 - in /sling/site/trunk/content/documentation/bundles: sling-hc-plugin.jpg sling-health-check-tool.mdtext
Author: bdelacretaz Date: Tue Sep 17 14:06:53 2013 New Revision: 1524048 URL: http://svn.apache.org/r1524048 Log: Adapt Health Check docs to latest changes Modified: sling/site/trunk/content/documentation/bundles/sling-hc-plugin.jpg sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext Modified: sling/site/trunk/content/documentation/bundles/sling-hc-plugin.jpg URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/sling-hc-plugin.jpg?rev=1524048r1=1524047r2=1524048view=diff == Binary files - no diff available. Modified: sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext?rev=1524048r1=1524047r2=1524048view=diff == --- sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext (original) +++ sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext Tue Sep 17 14:06:53 2013 @@ -31,46 +31,51 @@ if needed. See the `org.apache.sling.hc. 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. -Besides executing them programatically, Health checks can be executed via a webconsole plugin or via JMX, +Besides executing them programmatically, Health checks can be executed via a webconsole plugin or via JMX, as described below. ## Health Check bundles -The Health Check subsystem consists of the following bundles, which are described below in more detail: +The Health Check subsystem consists of the following bundles: -* The only required bundle is `org.apache.sling.hc.api` which provides the API and some utility classes. -* `org.apache.sling.hc.healthchecks` provides default `HealthCheck` services. -* `org.apache.sling.hc.webconsole` provides the Webconsole plugin. -* `org.apache.sling.hc.jmx` provides JMX MBeans to execute `HealthCheck`s. -* `org.apache.sling.hc.samples` provides sample OSGi configurations that demonstrate the default `HealthCheck`s. These configurations are provided as Sling content, so the Sling Installer is required to activate them. +* The only required bundle is `org.apache.sling.hc.core` which provides the API, some utility classes and some generally useful `HealthCheck` services. +* `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.hc.jmx` provides JMX MBeans that execute `HealthCheck`s. +* `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. ## Out-of-the-box `HealthCheck` services -A useful set of default `HealthCheck`s is provided by the `org.apache.sling.hc.healthchecks` bundle. +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_. - * `SlingRequestStatusHealthCheck` checks the HTTP status of Sling requests. * `ScriptableHealthCheck` evaluates an expression written in any scripting language that Sling supports, and provides bindings to access JMX attributes and OSGi bundles states. - * `DefaultLoginsHealthCheck` can be used to verify that the default Sling logins fail. * `CompositeHealthCheck` executes a set of `HealthCheck` selected by tags, useful for creating higher-level checks. +And 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. + +Finally, 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, the details of which are defined by each service implementation. -Here's a `ScriptableHealthCheck` example configuration provided by the `org.apache.sling.hc.samples` bundle: +As an example, here's a `ScriptableHealthCheck` configuration provided by the `org.apache.sling.hc.samples` bundle: Factory PID = org.apache.sling.hc.ScriptableHealthCheck -PID =
svn commit: r878821 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/jconsole-hc.jpg documentation/bundles/sling-health-check-tool.html
Author: buildbot Date: Tue Sep 17 14:26:04 2013 New Revision: 878821 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/documentation/bundles/jconsole-hc.jpg websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Sep 17 14:26:04 2013 @@ -1 +1 @@ -1524044 +1524060 Modified: websites/staging/sling/trunk/content/documentation/bundles/jconsole-hc.jpg == Binary files - no diff available. Modified: websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html == --- websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html (original) +++ websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html Tue Sep 17 14:26:04 2013 @@ -104,49 +104,72 @@ supplying MBeans that expose the require /pre/div -pThe Result provides a emStatus/em (OK, WARN, CRITICAL etc.) and a human-readable log which provides additional info, including optional DEBUG messages -that help troubleshooting. The Result log is not stricly tied to a logging model, so codeHealthCheck/codes are free to invent their own types of logging messages -if needed. See the codeorg.apache.sling.hc.api.Result/code class and its tests for more details. /p +pWhere codeResult/code is a simple immutable class that provides a codeStatus/code (OK, WARN, CRITICAL etc.) and one or more log-like messages that +can provide more info about what, if anything, went wrong./p +div class=codehiliteprespan class=npublic/span span class=nclass/span span class=nResult/span span class=nimplements/span span class=nIterable/span span class=olt;/spanspan class=nResultLog/spanspan class=p./spanspan class=nEntry/spanspan class=ogt;/span span class=p{/span + +span class=npublic/span span class=nboolean/span span class=nisOk/spanspan class=p()/span span class=p{/span +span class=kreturn/span span class=ngetStatus/spanspan class=p()./spanspan class=nequals/spanspan class=p(/spanspan class=nStatus/spanspan class=p./spanspan class=nOK/spanspan class=p);/span +span class=p}/span + +span class=npublic/span span class=nStatus/span span class=ngetStatus/spanspan class=p()/span span class=p{/span +span class=kreturn/span span class=nresultLog/spanspan class=p./spanspan class=ngetAggregateStatus/spanspan class=p();/span +span class=p}/span + +span class=p@/spanspan class=nOverride/span +span class=npublic/span span class=nIterator/spanspan class=olt;/spanspan class=nResultLog/spanspan class=p./spanspan class=nEntry/spanspan class=ogt;/span span class=niterator/spanspan class=p()/span span class=p{/span +span class=kreturn/span span class=nresultLog/spanspan class=p./spanspan class=niterator/spanspan class=p();/span +span class=p}/span + +span class=p.../span span class=ndetails/span span class=nomitted/span +span class=p}/span +/pre/div + + pcodeHealthCheck/code services can be selected for execution based on their codehc.tags/code multi-value service property. /p pThe codeHealthCheckFilter/code utility accepts positive and negative tag parameters, so that code-security,sling/code selects all codeHealthCheck/code having the codesling/code tag but not the codesecurity/code tag, for example./p -pBesides executing them programatically, Health checks can be executed via a webconsole plugin or via JMX, +pBesides executing them programmatically, Health checks can be executed via a webconsole plugin or via JMX, as described below./p h2 id=health-check-bundlesHealth Check bundles/h2 -pThe Health Check subsystem consists of the following bundles, which are described below in more detail:/p +pThe Health Check subsystem consists of the following bundles:/p ul -liThe only required bundle is codeorg.apache.sling.hc.api/code which provides the API and some utility classes./li -licodeorg.apache.sling.hc.healthchecks/code provides default codeHealthCheck/code services./li -licodeorg.apache.sling.hc.webconsole/code provides the Webconsole plugin./li -licodeorg.apache.sling.hc.jmx/code provides JMX MBeans to execute codeHealthCheck/codes./li -licodeorg.apache.sling.hc.samples/code provides sample OSGi configurations that demonstrate the default codeHealthCheck/codes. These configurations are provided as Sling content, so the Sling Installer is required to activate them./li +liThe only required bundle is codeorg.apache.sling.hc.core/code which provides the API, some utility classes and some generally useful codeHealthCheck/code services. /li
svn commit: r878824 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/sling-health-check-tool.html
Author: buildbot Date: Tue Sep 17 14:29:38 2013 New Revision: 878824 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Sep 17 14:29:38 2013 @@ -1 +1 @@ -1524060 +1524065 Modified: websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html == --- websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html (original) +++ websites/staging/sling/trunk/content/documentation/bundles/sling-health-check-tool.html Tue Sep 17 14:29:38 2013 @@ -145,7 +145,7 @@ as described below./p pThe codeorg.apache.sling.hc.samples/code bundle provides OSGi configurations that demonstrate them./p ul licodeJmxAttributeHealthCheck/code checks the value of a single JMX attribute and supports ranges like embetween 12 and 42/em. /li -licodeScriptableHealthCheck/code evaluates an expression written in any scripting language that Sling supports, and provides bindings to access JMX attributes and OSGi bundles states. /li +licodeScriptableHealthCheck/code evaluates an expression written in any scripting language that Sling supports, and provides bindings to access JMX attributes. /li licodeCompositeHealthCheck/code executes a set of codeHealthCheck/code selected by tags, useful for creating higher-level checks./li /ul pAnd a few more Sling-specific ones are provided by the codeorg.apache.sling.hc.support/code bundle:/p @@ -180,13 +180,13 @@ checks that have a non-OK status./p pimg src=sling-hc-plugin.jpg style=max-width:700px alt=Health Check Webconsole Plugin//p h2 id=jmx-access-to-health-checksJMX access to health checks/h2 pIf the codeorg.apache.sling.hc.jmx/code bundle is active, a JMX MBean is created for each codeHealthCheck/code 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'/p +service property codehc.mbean.name/code service property set. All health check MBeans are registered in the +domain codeorg.apache.sling.healthcheck/code with a type of codeHealthCheck/code./p pThe MBean gives access to the codeResult/code and the log, as shown on the screenshot below. /p pSee the example configurations of the codeorg.apache.sling.hc.samples/code for more details./p pimg src=jconsole-hc.jpg style=max-width:700px alt=JConsole showing Sling Health Check MBeans//p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1524059 by bdelacretaz on Tue, 17 Sep 2013 14:16:51 + +Rev. 1524065 by bdelacretaz on Tue, 17 Sep 2013 14:29:29 + /div div class=trademarkFooter Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
svn commit: r1524065 - /sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext
Author: bdelacretaz Date: Tue Sep 17 14:29:29 2013 New Revision: 1524065 URL: http://svn.apache.org/r1524065 Log: text tweaks Modified: sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext Modified: sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext?rev=1524065r1=1524064r2=1524065view=diff == --- sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext (original) +++ sling/site/trunk/content/documentation/bundles/sling-health-check-tool.mdtext Tue Sep 17 14:29:29 2013 @@ -67,7 +67,7 @@ The following default `HealthCheck` serv 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 and OSGi bundles states. + * `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. And a few more Sling-specific ones are provided by the `org.apache.sling.hc.support` bundle: @@ -108,8 +108,8 @@ The screenshot below shows an example, a ## 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' +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.
svn commit: r1524100 - /sling/whiteboard/bdelacretaz/it-repository/src/test/java/org/apache/sling/jcr/repository/it/SlingRepositoryITBase.java
Author: bdelacretaz Date: Tue Sep 17 15:45:02 2013 New Revision: 1524100 URL: http://svn.apache.org/r1524100 Log: SLING-3076 - test query using mixin Modified: sling/whiteboard/bdelacretaz/it-repository/src/test/java/org/apache/sling/jcr/repository/it/SlingRepositoryITBase.java Modified: sling/whiteboard/bdelacretaz/it-repository/src/test/java/org/apache/sling/jcr/repository/it/SlingRepositoryITBase.java URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/it-repository/src/test/java/org/apache/sling/jcr/repository/it/SlingRepositoryITBase.java?rev=1524100r1=1524099r2=1524100view=diff == --- sling/whiteboard/bdelacretaz/it-repository/src/test/java/org/apache/sling/jcr/repository/it/SlingRepositoryITBase.java (original) +++ sling/whiteboard/bdelacretaz/it-repository/src/test/java/org/apache/sling/jcr/repository/it/SlingRepositoryITBase.java Tue Sep 17 15:45:02 2013 @@ -176,7 +176,7 @@ public abstract class SlingRepositoryITB } @Test -public void testQuery() throws RepositoryException { +public void testSqlQuery() throws RepositoryException { final Session s = repository.loginAdministrative(null); final String id = ID_ + System.currentTimeMillis(); final String propName = PROP_ + id; @@ -207,6 +207,34 @@ public abstract class SlingRepositoryITB } @Test +public void testXpathQueryWithMixin() throws RepositoryException { +Session s = repository.loginAdministrative(null); +try { +final String path = XPATH_QUERY_ + System.currentTimeMillis(); +final String absPath = / + path; +final Node n = deleteAfterTests(s.getRootNode().addNode(path)); +n.addMixin(mix:title); +s.save(); + +final String statement = /jcr:root//element(*, mix:title); +@SuppressWarnings(deprecation) +final Query q = s.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH); +final NodeIterator it = q.execute().getNodes(); +assertTrue(Expecting a non-empty result, it.hasNext()); +boolean found = false; +while(it.hasNext()) { +if(it.nextNode().getPath().equals(absPath)) { +found = true; +break; +} +} +assertTrue(Expecting test node + absPath + to be found, found); +} finally { +s.logout(); +} +} + +@Test public final void checkRepositoryDescriptors() { doCheckRepositoryDescriptors(); }
svn commit: r1524130 - in /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event: impl/jobs/ impl/jobs/queues/ jobs/ jobs/consumer/
Author: cziegeler Date: Tue Sep 17 17:10:39 2013 New Revision: 1524130 URL: http://svn.apache.org/r1524130 Log: SLING-3028 : Support for progress tracking of jobs Added: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/consumer/JobState.java (with props) Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/Job.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/JobManager.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/consumer/JobConsumer.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutor.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/consumer/JobStatus.java Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java?rev=1524130r1=1524129r2=1524130view=diff == --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java Tue Sep 17 17:10:39 2013 @@ -455,7 +455,7 @@ public class JobConsumerManager { ((JobImpl)job).setProperty(JobConsumer.PROPERTY_JOB_ASYNC_HANDLER, asyncHandler); final JobConsumer.JobResult result = this.consumer.process(job); if ( result == JobResult.ASYNC ) { -return JobStatus.ASYNC; +return null; } else if ( result == JobResult.FAILED) { return JobStatus.FAILED; } else if ( result == JobResult.OK) { Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java?rev=1524130r1=1524129r2=1524130view=diff == --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java Tue Sep 17 17:10:39 2013 @@ -339,8 +339,6 @@ public abstract class AbstractJobQueue this.cancelledJob(); Utility.sendNotification(this.eventAdmin, JobUtil.TOPIC_JOB_CANCELLED, jobEvent.getJob(), null); break; -case ASYNC: // nothing to do here -break; } return reschedule; @@ -578,7 +576,7 @@ public abstract class AbstractJobQueue } } }); -if ( result.getState() == JobStatus.JobState.ASYNC ) { +if ( result == null ) { // ASYNC processing asyncCounter.incrementAndGet(); notifyFinished(null); isAsync.set(true); @@ -591,7 +589,7 @@ public abstract class AbstractJobQueue } finally { currentThread.setPriority(oldPriority); currentThread.setName(oldName); -if ( result.getState() != JobStatus.JobState.ASYNC ) { +if ( result != null ) { finishedJob(job.getId(), result, false); } } Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/Job.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/Job.java?rev=1524130r1=1524129r2=1524130view=diff == --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/Job.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/Job.java Tue Sep 17 17:10:39 2013 @@ -23,6 +23,8 @@ import java.util.Set; import
svn commit: r1524136 - in /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl: jobs/ jobs/queues/ support/
Author: cziegeler Date: Tue Sep 17 17:27:34 2013 New Revision: 1524136 URL: http://svn.apache.org/r1524136 Log: SLING-3028 : Support for progress tracking of jobs Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractParallelJobQueue.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/OrderedJobQueue.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/support/ResourceHelper.java Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java?rev=1524136r1=1524135r2=1524136view=diff == --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java Tue Sep 17 17:27:34 2013 @@ -42,6 +42,9 @@ public class JobImpl implements Job { /** Internal job property if this is an bridged event (event admin). */ public static final String PROPERTY_BRIDGED_EVENT = slingevent:eventadmin; +/** Internal job property containing optional delay override. */ +public static final String PROPERTY_DELAY_OVERRIDE = :slingevent:delayOverride; + private final ValueMap properties; private final String topic; @@ -230,6 +233,13 @@ public class JobImpl implements Job { } } +/** + * Prepare a new job execution + */ +public void prepare() { +this.properties.remove(JobImpl.PROPERTY_DELAY_OVERRIDE); +} + @Override public String toString() { return JobImpl [properties= + properties + , topic= + topic Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java?rev=1524136r1=1524135r2=1524136view=diff == --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/AbstractJobQueue.java Tue Sep 17 17:27:34 2013 @@ -532,34 +532,35 @@ public abstract class AbstractJobQueue try { synchronized ( job ) { +job.prepare(); result = consumer.process(job, new JobExecutionContext() { @Override -public void update(long eta) { +public void update(final long eta) { // TODO Auto-generated method stub } @Override -public void startProgress(long eta) { +public void startProgress(final long eta) { // TODO Auto-generated method stub } @Override -public void startProgress(int steps) { +public void startProgress(final int steps) { // TODO Auto-generated method stub } @Override -public void setProgress(int step) { +public void setProgress(final int step) { // TODO Auto-generated method stub } @Override -public void log(String message, Object... args) { +public void log(final String message, Object... args) { // TODO Auto-generated method stub } @@ -590,6 +591,9 @@
svn commit: r1524097 - /sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/UpdateNodePropertiesCommand.java
Author: stefanegli Date: Tue Sep 17 15:42:00 2013 New Revision: 1524097 URL: http://svn.apache.org/r1524097 Log: SLING-2989: support for deep .content.xml structure added Modified: sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/UpdateNodePropertiesCommand.java Modified: sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/UpdateNodePropertiesCommand.java URL: http://svn.apache.org/viewvc/sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/UpdateNodePropertiesCommand.java?rev=1524097r1=1524096r2=1524097view=diff == --- sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/UpdateNodePropertiesCommand.java (original) +++ sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/UpdateNodePropertiesCommand.java Tue Sep 17 15:42:00 2013 @@ -20,6 +20,7 @@ import java.io.IOException; import java.math.BigDecimal; import java.util.Calendar; import java.util.HashSet; +import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.UUID; @@ -39,20 +40,44 @@ import org.apache.sling.ide.transport.Re public class UpdateNodePropertiesCommand extends JcrCommandVoid { -private final MapString, Object serializationData; +private ResourceProxy resource; -public UpdateNodePropertiesCommand(Repository jcrRepo, Credentials credentials, FileInfo fileInfo, + public UpdateNodePropertiesCommand(Repository jcrRepo, Credentials credentials, FileInfo fileInfo, ResourceProxy resource) { super(jcrRepo, credentials, resource.getPath()); - -this.serializationData = resource.getProperties(); + +this.resource = resource; } @Override protected Void execute0(Session session) throws RepositoryException, IOException { -Node node = session.getNode(getPath()); + update(resource, session); +return null; +} + +private void update(ResourceProxy resource, Session session) throws RepositoryException, IOException { +String resPath = resource.getPath(); + updatePath(resPath, resource.getProperties(), session); +IteratorResourceProxy it = resource.getChildren().iterator(); +while(it.hasNext()) { + update(it.next(), session); +} + } + + private void updatePath(final String path, final MapString, Object serializationData, final Session session) throws RepositoryException, IOException { + if (!session.nodeExists(path)) { + // then create the node + Object primaryType = serializationData.get(jcr:primaryType); + String relPath = path.startsWith(/) ? path.substring(1) : path; + if (primaryType!=null) { + session.getRootNode().addNode(relPath, String.valueOf(primaryType)); + } else { + session.getRootNode().addNode(relPath); + } + } +Node node = session.getNode(path); SetString propertiesToRemove = new HashSetString(); PropertyIterator properties = node.getProperties(); @@ -168,8 +193,6 @@ public class UpdateNodePropertiesCommand prop.remove(); } -return null; - } private Value[] toValueArray(String[] strings, Session session) throws RepositoryException {
svn commit: r1524099 - /sling/branches/tooling-ide-vlt/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java
Author: stefanegli Date: Tue Sep 17 15:44:21 2013 New Revision: 1524099 URL: http://svn.apache.org/r1524099 Log: SLING-3072 and SLING-2989 : as alternative to a combined command, filter directories if a corresponding .content.xml exists (.dir currently explicitly ignored - tbfixed). Also, not ignoring publish requests for bundles even if NO_CHANGE - that is a valid case for bundles as ./target might be ignored Modified: sling/branches/tooling-ide-vlt/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java Modified: sling/branches/tooling-ide-vlt/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java URL: http://svn.apache.org/viewvc/sling/branches/tooling-ide-vlt/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java?rev=1524099r1=1524098r2=1524099view=diff == --- sling/branches/tooling-ide-vlt/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java (original) +++ sling/branches/tooling-ide-vlt/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java Tue Sep 17 15:44:21 2013 @@ -21,9 +21,11 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.Arrays; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import java.util.Map; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.HttpClient; @@ -173,12 +175,6 @@ public class SlingLaunchpadBehaviour ext return; } -if (kind == IServer.PUBLISH_AUTO deltaKind == ServerBehaviourDelegate.NO_CHANGE) { -System.out -.println(Ignoring request to publish the module when no resources have changed; most likely another module has changed); -return; -} - try { if (ProjectHelper.isBundleProject(module[0].getProject())) { String serverMode = getServer().getMode(); @@ -189,6 +185,11 @@ public class SlingLaunchpadBehaviour ext publishBundleModule(module, monitor); } } else if (ProjectHelper.isContentProject(module[0].getProject())) { +if (kind == IServer.PUBLISH_AUTO deltaKind == ServerBehaviourDelegate.NO_CHANGE) { +System.out +.println(Ignoring request to publish the module when no resources have changed; most likely another module has changed); +return; +} try { publishContentModule(kind, deltaKind, module, monitor); } catch (SerializationException e) { @@ -279,8 +280,6 @@ public class SlingLaunchpadBehaviour ext // otherwise fallback to old behaviour Repository repository = ServerUtil.getRepository(getServer(), monitor); - -IModuleResource[] moduleResources = getResources(module); // TODO it would be more efficient to have a module - filter mapping // it would be simpler to implement this in SlingContentModuleAdapter, but @@ -289,8 +288,12 @@ public class SlingLaunchpadBehaviour ext switch (deltaKind) { case ServerBehaviourDelegate.CHANGED: -IModuleResourceDelta[] publishedResourceDelta = getPublishedResourceDelta(module); -for (IModuleResourceDelta resourceDelta : publishedResourceDelta) { +ListIModuleResourceDelta publishedResourceDelta = + Arrays.asList(getPublishedResourceDelta(module)); + +ListIModuleResourceDelta adjustedPublishedResourceDelta = filterContentXmlParents(publishedResourceDelta); + +for (IModuleResourceDelta resourceDelta : adjustedPublishedResourceDelta) { StringBuilder deltaTrace = new StringBuilder(); deltaTrace.append(- processing delta kind ); @@ -331,12 +334,15 @@ public class SlingLaunchpadBehaviour ext case ServerBehaviourDelegate.ADDED: case ServerBehaviourDelegate.NO_CHANGE: // TODO is this correct ? -for (IModuleResource resource : moduleResources) { +IModuleResource[] moduleResources1 = getResources(module); +ListIModuleResource adjustedModuleResourcesList = filterContentXmlParents(moduleResources1); +for (IModuleResource resource : adjustedModuleResourcesList) { execute(addFileCommand(repository, resource)); } break; case ServerBehaviourDelegate.REMOVED: -for (IModuleResource resource : moduleResources) { +