kwin commented on a change in pull request #39:
URL:
https://github.com/apache/sling-org-apache-sling-api/pull/39#discussion_r743436861
##########
File path: src/main/java/org/apache/sling/api/resource/ResourceResolver.java
##########
@@ -842,4 +842,20 @@ Resource copy(final String srcAbsPath,
*/
Resource move(final String srcAbsPath,
final String destAbsPath) throws PersistenceException;
+
+ /**
+ * Returns a map to store temporary objects.
+ *
+ * This map is suited to store objects which share the same lifecycle as
the
+ * resource resolver. The resource resolver itself does not use this map.
+ *
+ * The resource resolver will clear the map during {@link #close()}, so
afterwards the map is empty.
+ * If a stored value implements the {@link #Closeable} interface, the
ResourceResolver will invoke the
+ * <code>close()</code> of the value before clearing the map.
+ *
+ * @returns the property map
+ * @since 2.13.0
+ *
+ */
+ public @NotNull Map<String,Object> getPropertyMap();
Review comment:
Ok, let us stick with getPropertyMap()
##########
File path: src/main/java/org/apache/sling/api/resource/ResourceResolver.java
##########
@@ -607,8 +607,14 @@
* which was used to create this resolver is no longer active or
* any of the used resource providers is no longer active.
*
+ * All objects in the map maintained by {@link #getPropertyMap()} the map
implementing
+ * the {@link #Closeable} interface, will be closed by calling {@code
close()} on each of them.
+ * Any exception throwing by this call will be ignored. The order in which
the objects are
Review comment:
```suggestion
* Any exception thrown by this call will be ignored. The order in which
the objects are
```
##########
File path: src/main/java/org/apache/sling/api/resource/ResourceResolver.java
##########
@@ -607,8 +607,14 @@
* which was used to create this resolver is no longer active or
* any of the used resource providers is no longer active.
*
+ * All objects in the map maintained by {@link #getPropertyMap()} the map
implementing
Review comment:
```suggestion
* All objects in the map maintained by {@link #getPropertyMap()}
implementing
```
##########
File path: src/main/java/org/apache/sling/api/resource/ResourceResolver.java
##########
@@ -842,4 +848,20 @@ Resource copy(final String srcAbsPath,
*/
Resource move(final String srcAbsPath,
final String destAbsPath) throws PersistenceException;
+
+ /**
+ * Returns a map to store temporary objects.
+ *
+ * This map is suited to store objects which share the same lifecycle as
the
+ * resource resolver. The resource resolver itself does not use this map.
+ *
+ * The resource resolver will clear the map during {@link #close()}, so
afterwards the map is empty.
+ * If a stored value implements the {@link #Closeable} interface, the
ResourceResolver will invoke the
+ * <code>close()</code> of the value before clearing the map.
+ *
+ * @returns the property map
+ * @see #close()
+ * @since 2.13.0
Review comment:
Let us add the bundle version as well. Consumers need to know rather
that version!
##########
File path: src/main/java/org/apache/sling/api/resource/ResourceResolver.java
##########
@@ -842,4 +848,20 @@ Resource copy(final String srcAbsPath,
*/
Resource move(final String srcAbsPath,
final String destAbsPath) throws PersistenceException;
+
+ /**
+ * Returns a map to store temporary objects.
+ *
+ * This map is suited to store objects which share the same lifecycle as
the
+ * resource resolver. The resource resolver itself does not use this map.
+ *
+ * The resource resolver will clear the map during {@link #close()}, so
afterwards the map is empty.
+ * If a stored value implements the {@link #Closeable} interface, the
ResourceResolver will invoke the
+ * <code>close()</code> of the value before clearing the map.
+ *
+ * @returns the property map
+ * @see #close()
+ * @since 2.13.0
Review comment:
```suggestion
* @since 2.13.0 (Sling API Bundle 2.24.0)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]