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:51:51 UTC

[sling-org-apache-sling-launchpad-api] 01/07: SLING-1597 - adding config installation via launchpad

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

rombert pushed a commit to annotated tag org.apache.sling.launchpad.api-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-launchpad-api.git

commit 446cf80a3bf7cae889d91aac14135ea11e21ca9f
Author: Justin Edelson <ju...@apache.org>
AuthorDate: Mon Dec 20 16:15:25 2010 +0000

    SLING-1597 - adding config installation via launchpad
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/launchpad/api@1051167 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt                                         | 29 +++++++++++++
 pom.xml                                            | 47 ++++++++++++++++++++++
 .../launchpad/api/LaunchpadContentProvider.java    | 46 +++++++++++++++++++++
 3 files changed, 122 insertions(+)

diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..de815a8
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,29 @@
+Apache Sling Launchpad API
+
+This module contains the API exposed by the Launchpad to bundles within the embedded framework.
+It is not intended to be installed as a bundle into an OSGi framework; merely used as a dependency
+for bundles where access to the Launchpad environment is necessary.
+
+Getting Started
+===============
+
+This component uses a Maven 2 (http://maven.apache.org/) build
+environment. It requires a Java 5 JDK (or higher) and Maven (http://maven.apache.org/)
+2.0.7 or later. We recommend to use the latest Maven version.
+
+If you have Maven 2 installed, you can compile and
+package the jar using the following command:
+
+    mvn package
+
+See the Maven 2 documentation for other build features.
+
+The latest source code for this component is available in the
+Subversion (http://subversion.tigris.org/) source repository of
+the Apache Software Foundation. If you have Subversion installed,
+you can checkout the latest source using the following command:
+
+    svn checkout http://svn.apache.org/repos/asf/sling/trunk/launchpad/api
+
+See the Subversion documentation for other source control features.
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..4ea3d70
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+    agreements. See the NOTICE file distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file to you under the Apache License,
+    Version 2.0 (the "License"); you may not use this file except in compliance with the
+    License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+    Unless required by applicable law or agreed to in writing, software distributed under the
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+    either express or implied. See the License for the specific language governing permissions
+    and limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>9</version>
+        <relativePath>../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.launchpad.api</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Apache Sling Launchpad API</name>
+
+    <description>
+        This module contains the API exposed by Launchpad to bundles.
+    </description>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.sling.launchpad.api;version=1.0.0</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file
diff --git a/src/main/java/org/apache/sling/launchpad/api/LaunchpadContentProvider.java b/src/main/java/org/apache/sling/launchpad/api/LaunchpadContentProvider.java
new file mode 100644
index 0000000..59f4ed6
--- /dev/null
+++ b/src/main/java/org/apache/sling/launchpad/api/LaunchpadContentProvider.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.sling.launchpad.api;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Iterator;
+
+/**
+ * The <code>ResourceProvider</code> defines a simple API to access resources
+ * from the environment depending on how Sling is launched.
+ */
+public interface LaunchpadContentProvider {
+    
+    /**
+     * Returns an iterator of paths strings of the children of the given folder
+     * defined by its path.
+     */
+    Iterator<String> getChildren(String path);
+
+    /**
+     * Returns an URL to the resource with the given path or <code>null</code>
+     * if no such resource exists.
+     */
+    URL getResource(String path);
+
+    /**
+     * Returns an <code>InputStream</code> to the resource given by the path
+     * or <code>null</code> if no such resource exists.
+     */
+    InputStream getResourceAsStream(String path);
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.