incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r921311 - in /sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp: DefaultResourceTypeProvider.java PathBasedResourceDecorator.java
Date Wed, 10 Mar 2010 11:34:10 GMT
Author: cziegeler
Date: Wed Mar 10 11:34:09 2010
New Revision: 921311

URL: http://svn.apache.org/viewvc?rev=921311&view=rev
Log:
Fix resource decorator

Added:
    sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/PathBasedResourceDecorator.java
      - copied, changed from r920997, sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/DefaultResourceTypeProvider.java
Removed:
    sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/DefaultResourceTypeProvider.java

Copied: sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/PathBasedResourceDecorator.java
(from r920997, sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/DefaultResourceTypeProvider.java)
URL: http://svn.apache.org/viewvc/sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/PathBasedResourceDecorator.java?p2=sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/PathBasedResourceDecorator.java&p1=sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/DefaultResourceTypeProvider.java&r1=920997&r2=921311&rev=921311&view=diff
==============================================================================
--- sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/DefaultResourceTypeProvider.java
(original)
+++ sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/PathBasedResourceDecorator.java
Wed Mar 10 11:34:09 2010
@@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
  * @scr.property name="service.description" value="Sling Sample Resource Decorator"
  * @scr.service
  */
-public class DefaultResourceTypeProvider implements ResourceDecorator {
+public class PathBasedResourceDecorator implements ResourceDecorator {
 
     /**
      *  Name of the configurable property name that defines mappings. The default values
@@ -87,7 +87,7 @@ public class DefaultResourceTypeProvider
                 //    and the primary node type equals the resource type
                 try {
                     final Node node = resource.adaptTo(Node.class);
-                    if ( node != null && node.getPrimaryNodeType().equals(resource.getResourceType())
) {
+                    if ( node != null && node.getPrimaryNodeType().getName().equals(resource.getResourceType())
) {
                         apply = true;
                         resourceType = resource.getResourceType();
                     }



Mime
View raw message