Author: cziegeler
Date: Fri Mar 14 15:48:37 2014
New Revision: 1577583
URL: http://svn.apache.org/r1577583
Log:
SLING-3451 : Support for deep reads from a value map
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/AbstractResource.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/AbstractResource.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/AbstractResource.java?rev=1577583&r1=1577582&r2=1577583&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/AbstractResource.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/AbstractResource.java
Fri Mar 14 15:48:37 2014
@@ -157,14 +157,4 @@ public abstract class AbstractResource
return valueMap;
}
-
- @SuppressWarnings("unchecked")
- @Override
- public <AdapterType> AdapterType adaptTo(final Class<AdapterType> type) {
- if ( type == ValueMap.class ) {
- return (AdapterType) new DeepReadValueMapDecorator(this,
ValueMap.EMPTY);
- }
- return super.adaptTo(type);
- }
-
}
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java?rev=1577583&r1=1577582&r2=1577583&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java
Fri Mar 14 15:48:37 2014
@@ -27,9 +27,10 @@ import aQute.bnd.annotation.ProviderType
* <p>
* The <code>Resource</code> is also an {@link Adaptable} to get adapters to
* other types. A JCR based resource might support adapting to the JCR Node on
- * which the resource is based. All implementations must support adapting
- * to a {@link ValueMap}. In this case, the call is similar to call
- * {@link #getValueMap()}.
+ * which the resource is based.
+ * <p>
+ * All implementations must support returning a value map from
+ * {@link #getValueMap()}, even if the map is empty.
* <p>
* Implementor's Note: It is recommended to not implement this interface
* directly. Rather consider either extending from {@link AbstractResource} or