You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:52:25 UTC
[sling-org-apache-sling-launchpad-installer] 03/10: SLING-1901 -
integration test and bugfix for LaunchpadConfigInstaller
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.launchpad.installer-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-launchpad-installer.git
commit ab7ecb6a120f2473830c82fdacaffbfd5a04ab07
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Dec 24 11:45:05 2010 +0000
SLING-1901 - integration test and bugfix for LaunchpadConfigInstaller
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/launchpad/installer@1052489 13f79535-47bb-0310-9956-ffa450edef68
---
.../installer/impl/LaunchpadConfigInstaller.java | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java b/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
index c4ad12e..91fa78b 100644
--- a/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
+++ b/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
@@ -33,8 +33,8 @@ import org.slf4j.LoggerFactory;
@Component
public class LaunchpadConfigInstaller {
- /**
- *
+ /** Resources supplied under this path by
+ * LaunchpadContentProvider are considered for installation
*/
private static final String ROOT_CONFIG_PATH = "resources/config";
@@ -47,22 +47,19 @@ public class LaunchpadConfigInstaller {
private Logger logger = LoggerFactory.getLogger(this.getClass());
protected void activate(ComponentContext componentContext) {
- logger.info("Activating launchpad config installer.");
-
+ logger.info("Activating launchpad config installer, resources path={}", ROOT_CONFIG_PATH);
Collection<InstallableResource> installables = new HashSet<InstallableResource>();
Iterator<String> configPaths = resourceProvider.getChildren(ROOT_CONFIG_PATH);
while (configPaths.hasNext()) {
String path = configPaths.next();
-
- logger.info("Installing config launchpad file: {}", path);
-
+ logger.info("Config launchpad file will be installed: {}", path);
InputStream stream = resourceProvider.getResourceAsStream(path);
-
installables.add(new InstallableResource(path, stream, null, null, InstallableResource.TYPE_CONFIG, 0));
-
}
- installer.registerResources("launchpad", (InstallableResource[])installables.toArray());
+ final InstallableResource [] toInstall = installables.toArray(new InstallableResource []{});
+ installer.registerResources("launchpad", (toInstall));
+ logger.info("{} resources registered with OsgiInstaller", toInstall.length);
}
-}
+}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.