This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.installer.provider.file-1.0.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-installer-provider-file.git
commit 46401b3e505ad019c262bbe82934f40d8685d976 Author: Carsten Ziegeler <[email protected]> AuthorDate: Tue Aug 24 11:33:44 2010 +0000 SLING-1689 : Change the OSGi installer interface git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/installer/fileinstall@988489 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/sling/installer/file/impl/Installer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/sling/installer/file/impl/Installer.java b/src/main/java/org/apache/sling/installer/file/impl/Installer.java index 7029957..8af9fd7 100644 --- a/src/main/java/org/apache/sling/installer/file/impl/Installer.java +++ b/src/main/java/org/apache/sling/installer/file/impl/Installer.java @@ -34,6 +34,9 @@ import org.slf4j.LoggerFactory; /** * The <code>Installer</code> is the service calling the * OSGi installer + * + * TODO - We should collect all changes from a scan and send + * them to the installer in a batch */ public class Installer implements FileChangesListener { @@ -57,7 +60,7 @@ public class Installer implements FileChangesListener { public void added(final File file) { LoggerFactory.getLogger(this.getClass()).info("Added file {}", file); final InstallableResource resource = this.createResource(file); - this.installer.addResource(this.scheme, resource); + this.installer.updateResources(this.scheme, new InstallableResource[] {resource}, null); } /** @@ -66,7 +69,7 @@ public class Installer implements FileChangesListener { public void changed(final File file) { LoggerFactory.getLogger(this.getClass()).info("Changed file {}", file); final InstallableResource resource = this.createResource(file); - this.installer.addResource(this.scheme, resource); + this.installer.updateResources(this.scheme, new InstallableResource[] {resource}, null); } /** @@ -115,6 +118,6 @@ public class Installer implements FileChangesListener { */ public void removed(final File file) { LoggerFactory.getLogger(this.getClass()).info("Removed file {}", file); - this.installer.removeResource(this.scheme, file.getAbsolutePath()); + this.installer.updateResources(this.scheme, null, new String[] {file.getAbsolutePath()}); } } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
