This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-fsresource.git


The following commit(s) were added to refs/heads/master by this push:
     new 20a21bb  SLING-11519 Include adapter metadata in the resulting bundle 
(#1)
20a21bb is described below

commit 20a21bb037bd0db84ebaf459d0ae2eab9169b02c
Author: Konrad Windszus <[email protected]>
AuthorDate: Sun Aug 21 13:32:08 2022 +0200

    SLING-11519 Include adapter metadata in the resulting bundle (#1)
    
    Also mention adaptations to ValueMap and Node
    Fix class name in condition
---
 pom.xml                                                            | 2 +-
 .../org/apache/sling/fsprovider/internal/mapper/FileResource.java  | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 062c939..783bd57 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,10 +50,10 @@
             <plugin>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>sling-maven-plugin</artifactId>
+                <version>3.0.2</version>
                 <executions>
                     <execution>
                         <id>generate-adapter-metadata</id>
-                        <phase>process-classes</phase>
                         <goals>
                             <goal>generate-adapter-metadata</goal>
                         </goals>
diff --git 
a/src/main/java/org/apache/sling/fsprovider/internal/mapper/FileResource.java 
b/src/main/java/org/apache/sling/fsprovider/internal/mapper/FileResource.java
index 75c98d2..72401d4 100644
--- 
a/src/main/java/org/apache/sling/fsprovider/internal/mapper/FileResource.java
+++ 
b/src/main/java/org/apache/sling/fsprovider/internal/mapper/FileResource.java
@@ -54,12 +54,13 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * The <code>FsResource</code> represents a file system file or folder as
+ * The <code>FileResource</code> represents a file system file or folder as
  * a Sling Resource.
  */
 @Adaptable(adaptableClass=Resource.class, adapters={
-    @Adapter({File.class, URL.class}),
-    @Adapter(condition="If the resource is an FsResource and is a readable 
file.", value=InputStream.class)
+    @Adapter({File.class, URL.class, ValueMap.class}),
+    @Adapter(value=InputStream.class, condition="If the adaptable is a 
FileResource and is a readable file."),
+    @Adapter(value=Node.class, condition="If the adaptable is a FileResource 
and is providing content in JSON or FileVault XML format.")
 })
 public final class FileResource extends AbstractResource {
 

Reply via email to